<LinearGradientBrush x:Key="MaroonGradientBrush" EndPoint="0,1" StartPoint="0,0">
<GradientStop Color="#FF0C0B0B" Offset="1"/>
<GradientStop Color="#FFBF5656"/>
</LinearGradientBrush>
<Window
x:Class="GraphViewerWindow"
RenderOptions.EdgeMode="Unspecified"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:DaedalusGraphViewer="clr-namespace:DaedalusGraphViewer"
Title="Window1" Height="900" Width="900">
<TextBox Background="{StaticResource MaroonGradientBrush}" />
</Window>
プログラムが開き、正しいグラデーション ブラシを含むウィンドウが表示されます。ただし、maroongradientbrush が見つからないため、デザイン ビューはまだウィンドウをロードしません。
編集:
私の問題を見つけました。それはまさにこれです:
しかし、それに対する投稿された解決策はありません