开发者

change datatemplate resource runtime

开发者 https://www.devze.com 2023-03-23 07:10 出处:网络
I have created one datatemplate resouce in my xaml file <navigation:Page.Resources> <DataTemplate x:Key=\"PageFooter\" >

I have created one datatemplate resouce in my xaml file

<navigation:Page.Resources>
        <DataTemplate x:Key="PageFooter" >
            <StackPanel Width="{Binding Path=UsablePageWidth, Mode=OneWay}" Height="Auto"  x:Name="spFooter" HorizontalAlignment="Center">
                <TextBlock  x:Name="txtParameter" FontSize="16" Text="{Binding}"
 FontWeight="Bold" Foreground="White" 
   开发者_如何学C                        HorizontalContentAlignment="Center" 
                           Width="{Binding Path=UsablePageWidth, Mode=OneWay}"
                           Background="Black" Height="35" />
            </StackPanel>
        </DataTemplate>
    </navigation:Page.Resources>

Now in my code behind i want to update this Textblock with my database value

How to do this? I am new in silverlight

0

精彩评论

暂无评论...
验证码 换一张
取 消