English 中文(简体)
在XAML中将幻灯塔转换成正文
原标题:Apply SlideTransition effect to a TextBlock in XAML

I would like to apply a SlideTransition effect to a TextBlock similar to the title of the Calendar app which changes when scrolling down or up through the days (starting from "TODAY").

The following code reported here is a good starting point:

SlideTransition slideTransition = new SlideTransition { Mode = SlideTransitionMode.SlideUpFadeIn };
ITransition transition = slideTransition.GetTransition(ApplicationTitle);
transition.Completed += delegate { transition.Stop(); };
transition.Begin();

但我要在XAML而不是在C#中宣布。

是可能的?

感谢您,

Francesco

最佳回答

You can not declare UIElement Transition in XAML. You can declare in XAML only Page Transitions.

问题回答

possible? 可能的话。 几乎是不可能的。

你可能不得不写上你自己所附的财产/发明或行为,这些财产或行为是该法典的结晶,然后是装入你的Xaml的电线。





相关问题
How to bind a TabControl to an ObservableCollection in XAML

I have the following line of code in my code-behind class. TabControl.ItemsSource = ((MainWindowViewModel)DataContext).TabItemViewModels; I would like to move this to the XAML file. In brief, ...

Bind to ancestor of adorned element

Here is the case: <DataTemplate x:Key="ItemTemplate" DataType="local:RoutedCustomCommand"> <Button Command="{Binding}" Content="{Binding Text}" ...

FlowDocument Force a PageBreak (BreakPageBefore)

I m using C# to create a FlowDocument and fill it with data within a table. Example: FlowDocument flowDoc = new FlowDocument(); Table table1 = new Table(); flowDoc.Blocks.Add(table1); table1....

Editing a xaml icons or images

Is it possible to edit a xaml icons or images in the expression design or using other tools? Is it possible to import a xaml images (that e.g you have exported) in the expression designer for editing?...

WPF TreeView binding through XAML

So I have a class structure like this Store Owner Cashier List of Products Product Name Price List of Vendors Company Name Contact Name So there are 4 ...

How to combine DataTrigger and EventTrigger?

NOTE I have asked the related question (with an accepted answer): How to combine DataTrigger and Trigger? I think I need to combine an EventTrigger and a DataTrigger to achieve what I m after: when ...

热门标签