wpf中:xaml中的命名空间的引入方法
生活随笔
收集整理的這篇文章主要介紹了
wpf中:xaml中的命名空间的引入方法
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
<Window?x:Class="Test2.MainWindow"?? ????????xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"?? ????????xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"?? ????????xmlns:sys="clr-namespace:System;assembly=mscorlib"?? ????????Title="MainWindow"?Height="350"?Width="525">?? ????<Grid>?? ?????????? ????????<StackPanel>?? ????????????<StackPanel.Resources>?? ????????????????<sys:String?x:Key="myString">?? ????????????????????lasklsdsldfslfd?? ????????????????</sys:String>?? ????????????</StackPanel.Resources>?? ????????????<TextBox?x:Name="textBox1"?Text="{Binding?Path=Text[4],ElementName=textBox2,?Mode=OneWay}"></TextBox>?? ????????????<TextBox?x:Name="textBox2"?Text="{StaticResource?ResourceKey=myString}"></TextBox>?? ????????</StackPanel>?? ????</Grid>?? </Window>??
wpf中:xaml中的命名空間的引入????????????????????????????
本文章已收錄于: ?????????????????????- ??????? 在xaml中如有要使用c#數(shù)據(jù)類型,那么需要引入c#的命名空間,如需要使用String類,則需要引入String所在的命名空間。
總結(jié)
以上是生活随笔為你收集整理的wpf中:xaml中的命名空间的引入方法的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: duilib各种布局的作用,相对布局与绝
- 下一篇: 在ffmpeg中加入x264模块