@@ -22,7 +22,7 @@ class OpacityDemo : Component
2222 SubHeading (" Opacity Transition" ),
2323 Button (visible ? " Fade Out" : " Fade In" ,
2424 () => setVisible (! visible )),
25- Factories . Text (" This text fades in and out" )
25+ Text (" This text fades in and out" )
2626 .FontSize (18 ).Bold ()
2727 .Opacity (visible ? 1 . 0 : 0 . 0 )
2828 .OpacityTransition (TimeSpan .FromMilliseconds (500 ))
@@ -53,7 +53,7 @@ class ScaleDemo : Component
5353 Button (enlarged ? " Shrink" : " Enlarge" ,
5454 () => setEnlarged (! enlarged )),
5555 Border (
56- Factories . Text (" Scales up and down" ).FontSize (18 ).Bold ()
56+ Text (" Scales up and down" ).FontSize (18 ).Bold ()
5757 ).Padding (12 )
5858 .CornerRadius (8 )
5959 .Background (" #e8e8e8" )
@@ -85,7 +85,7 @@ class TranslationDemo : Component
8585 SubHeading (" Translation Transition" ),
8686 Button (moved ? " Slide Back" : " Slide Right" ,
8787 () => setMoved (! moved )),
88- Factories . Text (" Slides horizontally" )
88+ Text (" Slides horizontally" )
8989 .FontSize (18 ).Bold ()
9090 .Translation (moved ? 120 f : 0 f , 0 f , 0 f )
9191 .TranslationTransition ()
@@ -117,7 +117,7 @@ class BackgroundDemo : Component
117117 Button (warm ? " Cool Colors" : " Warm Colors" ,
118118 () => setWarm (! warm )),
119119 VStack (8 ,
120- Factories . Text (" Background animates between colors" )
120+ Text (" Background animates between colors" )
121121 .Foreground (" #ffffff" ).Bold ()
122122 ).Padding (16 )
123123 .CornerRadius (8 )
@@ -151,7 +151,7 @@ class CombinedDemo : Component
151151 Button (active ? " Reset" : " Animate" ,
152152 () => setActive (! active )),
153153 Border (
154- Factories . Text (" All at once" ).FontSize (16 ).Bold ()
154+ Text (" All at once" ).FontSize (16 ).Bold ()
155155 .Foreground (" #ffffff" )
156156 ).Padding (16 )
157157 .CornerRadius (8 )
@@ -197,7 +197,7 @@ class LayoutAnimationDemo : Component
197197 l .Count > 0 ? l .Take (l .Count - 1 ).ToList () : l ))
198198 ),
199199 VStack (4 , items .Select (item =>
200- Factories . Text (item ).Padding (8 , 12 ).Background (" #f0f0f0" )
200+ Text (item ).Padding (8 , 12 ).Background (" #f0f0f0" )
201201 .CornerRadius (4 ).LayoutAnimation ()
202202 .WithKey ($" item-{item }" )
203203 ).ToArray ())
@@ -232,7 +232,7 @@ class ConnectedAnimationDemo : Component
232232 if (selected is not null )
233233 return VStack (12 ,
234234 Button (" Back to list" , () => setSelected (null )),
235- Factories . Text (selected )
235+ Text (selected )
236236 .FontSize (28 ).Bold ()
237237 .ConnectedAnimation ($" title-{selected }" )
238238 ).Padding (24 );
@@ -281,7 +281,7 @@ class WithAnimationDemo : Component
281281 setOpacity (opacity > 0 . 5 ? 0 . 2 : 1 . 0 );
282282 });
283283 }),
284- Factories . Text (" Compositor-animated via WithAnimation scope" )
284+ Text (" Compositor-animated via WithAnimation scope" )
285285 .FontSize (18 ).Bold ()
286286 .Opacity (opacity )
287287 ).Padding (24 );
@@ -313,7 +313,7 @@ class AnimateDemo : Component
313313 SubHeading (" .Animate() Modifier" ),
314314 Button (active ? " Reset" : " Animate" , () => setActive (! active )),
315315 Border (
316- Factories . Text (" Spring-animated" ).FontSize (18 ).Bold ()
316+ Text (" Spring-animated" ).FontSize (18 ).Bold ()
317317 ).Padding (12 ).CornerRadius (8 ).Background (" #e8e8e8" )
318318 .Opacity (active ? 0 . 5 : 1 . 0 )
319319 .Animate (Microsoft .UI .Reactor .Animation .Curve .Spring (0 . 65 f ))
@@ -341,17 +341,17 @@ class InteractionStatesDemo : Component
341341 {
342342 return VStack (12 ,
343343 SubHeading (" InteractionStates" ),
344- Factories . Text (" Hover and press — zero reconcile, compositor-driven." ),
344+ Text (" Hover and press — zero reconcile, compositor-driven." ),
345345 HStack (12 ,
346346 Border (
347- Factories . Text (" Hover me" ).FontSize (16 ).Bold ()
347+ Text (" Hover me" ).FontSize (16 ).Bold ()
348348 .HAlign (HorizontalAlignment .Center ).VAlign (VerticalAlignment .Center )
349349 ).Padding (16 ).CornerRadius (8 ).Size (150 , 60 ).Background (" #50C878" )
350350 .InteractionStates (s => s
351351 .PointerOver (opacity : 0 . 85 f , scale : 1 . 05 f )
352352 .Pressed (scale : 0 . 95 f , opacity : 0 . 7 f )),
353353 Border (
354- Factories . Text (" Press me" ).FontSize (16 ).Bold ()
354+ Text (" Press me" ).FontSize (16 ).Bold ()
355355 .HAlign (HorizontalAlignment .Center ).VAlign (VerticalAlignment .Center )
356356 ).Padding (16 ).CornerRadius (8 ).Size (150 , 60 ).Background (" #9B59B6" )
357357 .InteractionStates (s => s
@@ -388,11 +388,11 @@ class TransitionDemo : Component
388388 Button (visible ? " Hide" : " Show" , () => setVisible (! visible )),
389389 visible
390390 ? Border (
391- Factories . Text (" Fade + Slide" ).FontSize (16 ).Bold ()
391+ Text (" Fade + Slide" ).FontSize (16 ).Bold ()
392392 .HAlign (HorizontalAlignment .Center ).VAlign (VerticalAlignment .Center )
393393 ).Padding (12 ).CornerRadius (8 ).Size (200 , 60 ).Background (" #E74C3C" )
394394 .Transition (Microsoft .UI .Reactor .Animation .Transition .Fade + Microsoft .UI .Reactor .Animation .Transition .Slide (Microsoft .UI .Reactor .Animation .Edge .Bottom ))
395- : (Element )Factories . Text (" (removed from tree)" )
395+ : (Element )Text (" (removed from tree)" )
396396 ).Padding (24 );
397397 }
398398}
@@ -429,7 +429,7 @@ class StaggerDemo : Component
429429 SubHeading (" Staggered Animation" ),
430430 Button (" Shuffle" , () => setItems (items .OrderBy (_ => Random .Shared .Next ()).ToArray ())),
431431 VStack (4 , items .Select (item =>
432- Factories . Text (item ).Padding (8 , 12 ).Background (" #f0f0f0" )
432+ Text (item ).Padding (8 , 12 ).Background (" #f0f0f0" )
433433 .CornerRadius (4 ).LayoutAnimation ()
434434 .WithKey (item )
435435 ).ToArray ()).Stagger (TimeSpan .FromMilliseconds (40 ))
@@ -461,7 +461,7 @@ class KeyframeDemo : Component
461461 SubHeading (" Keyframe Animation" ),
462462 Button (" Pulse!" , () => setCount (count + 1 )),
463463 Border (
464- Factories . Text (" Pulse target" ).FontSize (16 ).Bold ()
464+ Text (" Pulse target" ).FontSize (16 ).Bold ()
465465 .HAlign (HorizontalAlignment .Center ).VAlign (VerticalAlignment .Center )
466466 ).Padding (12 ).CornerRadius (8 ).Size (200 , 60 ).Background (" #9B59B6" )
467467 .Keyframes (" pulse" , count , kf => kf
@@ -504,7 +504,7 @@ class ChoreographyDemo : Component
504504 await Microsoft .UI .Reactor .Animation .AnimationScope .WithAnimationAsync (
505505 Microsoft .UI .Reactor .Animation .Curve .Spring (0 . 7 f ), () => setPhase (2 ));
506506 }),
507- Factories . Text ($" Phase: {phase }" ).FontSize (18 ).Bold ()
507+ Text ($" Phase: {phase }" ).FontSize (18 ).Bold ()
508508 .Opacity (phase == 0 ? 1 . 0 : phase == 1 ? 0 . 3 : 1 . 0 )
509509 ).Padding (24 );
510510 }
0 commit comments