Created
April 28, 2010 08:58
-
-
Save follesoe/381894 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<UserControl x:Class="UsercontrolContentControl.Overlay" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
Width="400" Height="300"> | |
<Grid x:Name="LayoutRoot" Background="White"> | |
<ContentControl Content="{Binding OverlayContent}" /> | |
</Grid> | |
</UserControl> | |
[ContentProperty("OverlayContent")] | |
public partial class Overlay | |
{ | |
public object OverlayContent | |
{ | |
get { return GetValue(OverlayContentProperty); } | |
set { SetValue(OverlayContentProperty, value); } | |
} | |
public static readonly DependencyProperty OverlayContentProperty = | |
DependencyProperty.Register("OverlayContent", | |
typeof(object), | |
typeof(Overlay), | |
new PropertyMetadata("", OnOverlayContentChanged)); | |
private static void OnOverlayContentChanged(object sender, DependencyPropertyChangedEventArgs args) | |
{ | |
} | |
public Overlay() | |
{ | |
InitializeComponent(); | |
} | |
} | |
<Grid x:Name="LayoutRoot"> | |
<local:Overlay> | |
<local:MovieInfo /> | |
</local:Overlay> | |
</Grid> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment