-1
我試圖在C#XMAL WPF應用程序中設置材質設計。 我將"Material Design In XAML"添加到我的項目中,之後出現以下錯誤:The property 'Content' can only be set once
哪裏會出現問題?我提供這給下面的錯誤文件:XAML:屬性「內容」只能設置一次 - 雖然只設置一次
<Window x:Class="e621_fetch.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:e621_fetch"
mc:Ignorable="d"
Title="MainWindow" Height="350" Width="525"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
TextElement.FontWeight="Regular"
TextElement.FontSize="13"
TextOptions.TextFormattingMode="Ideal"
TextOptions.TextRenderingMode="Auto"
Background="{DynamicResource MaterialDesignPaper}"
FontFamily="{DynamicResource MaterialDesignFont}">
<Grid>
<materialDesign:Card Padding="32" Margin="16"> //error on this line
<TextBlock Style="{DynamicResource MaterialDesignTitleTextBlock}">My First Material Design App</TextBlock> //error on this line
</materialDesign:Card> //error on this line
</Grid>
不知道爲什麼downvote,它解決了這個問題,似乎足夠清楚 – Grey
downvotes可能與你在回答你自己的問題後2分鐘的時間。看起來你甚至沒有嘗試自己修復它之前,你把它發佈在這裏在stackoverflow。 – opelhatza
在發佈xD問題後,我意識到了 – Grey