Skip to content
This repository has been archived by the owner on Feb 12, 2021. It is now read-only.

Commit

Permalink
Merge pull request #13 from dersteve/master
Browse files Browse the repository at this point in the history
Added new property VisibilityForDesign to make control visible for design
  • Loading branch information
ltomuta committed Dec 16, 2013
2 parents fb9dee8 + dd8df8f commit 6a0bef8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
8 changes: 4 additions & 4 deletions RateMyApp/Controls/FeedbackOverlay.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
Visibility="Collapsed"
Visibility="{Binding VisibilityForDesign, RelativeSource={RelativeSource Self}}"
d:DesignHeight="480" d:DesignWidth="480">

<UserControl.Resources>
Expand All @@ -45,16 +45,16 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>

<TextBlock x:Name="title" Grid.ColumnSpan="2" Margin="12,0,12,0" HorizontalAlignment="Left"
Style="{StaticResource PhoneTextTitle2Style}" FontWeight="Bold" TextWrapping="Wrap" />

<TextBlock x:Name="message" Grid.ColumnSpan="2" Grid.Row="1" Margin="12,12,12,12" HorizontalAlignment="Left"
Style="{StaticResource PhoneTextNormalStyle}" TextWrapping="Wrap" />

<Button x:Name="yesButton" Margin="0,0,0,0" Grid.Row="2" />
<Button x:Name="noButton" Margin="0,0,0,0" Grid.Row="2" Grid.Column="1" />

</Grid>
<Border.Projection>
<PlaneProjection x:Name="xProjection" />
Expand Down
13 changes: 13 additions & 0 deletions RateMyApp/Controls/FeedbackOverlay.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,19 @@ namespace RateMyApp.Controls
/// </summary>
public partial class FeedbackOverlay : UserControl
{
public static readonly DependencyProperty VisibilityForDesignProperty =
DependencyProperty.Register("VisibilityForDesign", typeof(System.Windows.Visibility), typeof(FeedbackOverlay), new PropertyMetadata(System.Windows.Visibility.Collapsed, null));

public static void SetVisibilityForDesign(FeedbackOverlay element, System.Windows.Visibility value)
{
element.SetValue(VisibilityForDesignProperty, value);
}

public static System.Windows.Visibility GetVisibilityForDesign(FeedbackOverlay element)
{
return (System.Windows.Visibility)element.GetValue(VisibilityForDesignProperty);
}

// Use this from XAML to control whether animation is on or off
#region EnableAnimation Dependency Property

Expand Down

0 comments on commit 6a0bef8

Please sign in to comment.