WPF中Textblock 变色功能
开发工具与关键技术:Visual Studio 2015、WPF
撰写时间: 2019年7月3日
WPF TextBlock再是开发程序中是很有用的,它可以支持设置部分文本的样式。我们在实际使用中还需要注意一些细节以提高我们对WPF的应用效率,下面这个例子实现的是变色功能用XAML代码实现:
<Window
x:Class="Wpf1.Window9"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Wpf1"
mc:Ignorable="d"
Title="Window9"
Height="450" Width="800">
<Window.Resources>
<Storyboard
x:Key="OnLoaded" RepeatBehavior="Forever"
AutoReverse="True" >
<