1
我只是第一次嘗試使用ControlTemplate作爲我想要創建的按鈕。ControlTemplate導致錯誤「屬性'內容'被設置多次」
但是,只要我把標籤<ControlTemplate>
放在任何地方,它就會出現錯誤。
<Window x:Class="MAQButtonTest.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="695" Width="996">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid Grid.Column="0" Background="#FFE9F1F6"></Grid>
<Grid Grid.Column="1" Background="#FFD2E3ED">
</Grid>
</Grid>
<ControlTemplate></ControlTemplate>
</Window>
我在哪裏放置標籤以防止出現此錯誤?