테두리가없는 wpf 양식을 그림자로 가져 오는 방법을 찾고있는 동안 this을 발견했습니다. Visual Studio 나 Microsoft Office와 같은 그림자를 만듭니다. 언급 된 사이트에서 다운로드 한 후, 내 프로젝트에서 WindowGlows.dll 파일을 참조하고이 코드를 예제의 예제에서 복사했습니다. WPF 테두리가없는 양식으로 WindowGlows를 사용하여 그림자를 만듭니다.
내가 시작을 클릭
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:WindowGlows="http://GlowWindow.codeplex.com/"
x:Class="WindowGlowsTestApp.MainWindow"
Title="MainWindow"
Height="350"
Width="525"
WindowGlows:GlowManager.EnableGlow="True"
WindowGlows:GlowManager.ActiveGlowBrush="CornflowerBlue"
WindowGlows:GlowManager.InactiveGlowBrush="LightGray">
<WindowChrome.WindowChrome>
<WindowChrome GlassFrameThickness="0"
CornerRadius="0"
CaptionHeight="36"
ResizeBorderThickness="0" />
</WindowChrome.WindowChrome>
<Border BorderThickness="1"
BorderBrush="{Binding Path=(WindowGlows:GlowManager.ActiveGlowBrush),RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=Window}}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="36" />
<RowDefinition />
<RowDefinition Height="24" />
</Grid.RowDefinitions>
<Rectangle Fill="{Binding Path=(WindowGlows:GlowManager.ActiveGlowBrush),RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=Window}}"
Margin="-1,11,-1,0"
StrokeThickness="0"
ClipToBounds="True" />
<TextBlock HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding Title, RelativeSource={RelativeSource AncestorType={x:Type Window}, Mode=FindAncestor}}"
Foreground="{Binding Path=(WindowGlows:GlowManager.InactiveGlowBrush),RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=Window}}"
Margin="0,11,0,0" />
<Rectangle Grid.Row="2"
Fill="{Binding Path=(WindowGlows:GlowManager.ActiveGlowBrush),RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=Window}}"
Margin="-1,0,-1,-1"
StrokeThickness="0"
ClipToBounds="True" />
</Grid>
</Border>
는, 형태는 환상적인 그림자를 떨어 내가 잘 사용이 넣을 수 있지만 나에게
Error 1 The name "GlowManager" does not exist in the namespace
을 말하는 오류를 제거 할 수 없습니다
글로우 관리자에 대한 6 가지 오류가 있지만 그 외에는 네임 스페이스를 어떻게 수정합니까?
실제 질문은 무엇입니까? –
xmal이 유효하지 않은 마크 업이고 디자인보기에서 작업 할 수없는 오류를 해결하기 전까지 네임 스페이스가 유효하지 않은 이유는 [이 페이지]를 방문한 것입니다. (http://msdn.microsoft.com/ en-us/library/ms747086 % 28v = vs.110 % 29.aspx) 그리고 거기에서 몇 가지 시도했지만 아무 소용이 없습니다. –