windows phone- xaml- binding
来源:互联网 发布:数据总线宽度 编辑:程序博客网 时间:2024/05/11 18:23
<span style="font-family: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">http://www.bcmeng.com/databinding/</span>
记录一下:
1 网页跳转
this. Frame.Navigate(typeof(className));
this. Frame.Navigate(typeof(className),parameter);
2. Binding in DataContext, ItemsSource
{Binding} - bind to current data, which is defined by parent;
{Binding property} - bind to the property, which is one of attributes of parent's binds or which is one of current datacontext;
<ListView ItemsSource="{Binding}" IsItemClickEnabled="True" ItemClick="GroupSection_ItemClick" ContinuumNavigationTransitionInfo.ExitElementContainer="True"> <ListView.ItemTemplate> <DataTemplate> <StackPanel Margin="0,0,0,27.5"> <TextBlock Text="{Binding Title}" Style="{ThemeResource ListViewItemTextBlockStyle}" /> </StackPanel> </DataTemplate> </ListView.ItemTemplate> </ListView>
{Binding MyObject.MyProperty} - bind to the specific property of MyObject
mc:Ignorable="d" DataContext="{Binding DefaultViewModel.Item, RelativeSource={RelativeSource Self}}" d:DataContext="{Binding Groups[0].Items[0], Source={d:DesignData Source=/DataModel/SampleData.json, Type=data:SampleDataSource}}"
{Binding ElementName=MyTextBox, Path=Text} - bind to the datacontext, which is another control with ID or Name of MyTextBox, binding to the Text property of MyTextBox
{Binding MyObject, RelativeSource={RelativeSource Self}}- bind to MyObject, which is a partical class of this page;
DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Self}}"
3.
DefaultViewModel <-> Page.DataContext
has |
groups[0] <-> HubSection.DataContext
has |
Items <-> GridView.ItemsSource
has |
ID/Name/... <-> GridView.ItemTemplate
4. One of the feature utility of binding is MVVM.
...
- windows phone- xaml- binding
- [翻译]使用XAML创建Windows Phone用户界面
- Windows phone 8 ---Binding.Converter Property
- windows phone xaml文件中元素及属性(10)
- VS 2012 for Windows Phone 8 中XAML格式设置
- windows phone通过加载xaml动态创建控件
- Windows Phone Toolkit MultiselectList in depth| Part2: Data Binding
- XAML Binding的几个元素
- win8+XAML Binding(数据绑定)
- Windows Phone 7 开发探索笔记8——加载XAML文件中的对象
- Windows Phone开发之xaml传值交互与控件hyperlinkButton和button的使用
- Windows Phone开发之独立存储、文件的读写、ListBox绑定数据、NavigationService实现XAML跳转
- windows phone 8中如何在App.xaml中使用ResourceDictionary
- windows phone 8 xaml/directx3d 切后台纹理未释放导致内存泄漏的问题
- Windows Phone 8.1中的.xaml文件开头那些奇怪的定义
- Silverlight 4 Binding and StringFormat in XAML
- (二) win8+XAML Binding(数据绑定)
- Xaml - Be careful of binding with ContextMenu
- 2.字符排序
- vc中调用Com组件的方法详解
- 《挑战程序设计》第一章第一题
- OSG场景保存
- [NOI2012]随机数生成器(矩阵乘法+快速乘)
- windows phone- xaml- binding
- 我的.Net学习之路五——Md5加密
- 《C标准库》—之<assert.h>实现
- taobao
- php中变量和常量。
- QT随机类名
- 蒙特卡罗算法解决两集合相等问题
- 快速排序算法
- JavaScript:数组中的一些方法