Main页面
This commit is contained in:
1 parent
a003d90b0e
commit
f03e2b08f4
33 files changed
+54543
-34
No files matched your search
@@ -18,9 +18,10 @@ globs: "**/*.xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:wpf="MAX.WPF"
|
||||
xmlns:s="clr-namespace:xxxx.xxx;assembly=xxx.xxx"
|
||||
d:DataContext="{d:DesignInstance Type=local:XxxViewModel}"
|
||||
Style="{DynamicResource UserControlStyle}"
|
||||
DataContext="{core:DISource Type=local:XxxViewModel}"
|
||||
d:DataContext="{d:DesignInstance Type=local:XxxViewModel}"
|
||||
d:Background="White"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800">
|
||||
```
|
||||
@@ -42,6 +43,14 @@ DataContext="{core:DISource Type=local:DialogViewModel}">
|
||||
- `d:DataContext="{d:DesignInstance Type=local:XxxViewModel}"` 提供设计时数据
|
||||
- `UserControlStyle` 与 `ViewModelBaseEx` 强相关,必须搭配使用
|
||||
|
||||
|
||||
|
||||
### 控件必须有设计数据
|
||||
|
||||
例如
|
||||
TextBlock > d:Text="TextBlock"
|
||||
ComboBox > d:ItemsSource="{d:SampleData ItemCount=5}"
|
||||
|
||||
## BindingProxy + CommandProxy(DataTemplate/ContextMenu 绑定)
|
||||
|
||||
**在 `DataTemplate`、`ContextMenu`、`DataGridTemplateColumn.CellTemplate` 中禁止使用 `RelativeSource AncestorType`,必须用 `BindingProxy` + `CommandProxy`。**
|
||||
|
||||
Reference in new issue
Block a user