Skip to content

Commit

Permalink
Added additional properties to be modified.
Browse files Browse the repository at this point in the history
*RoundedToggleWithInlineOptions.xaml now has brushes to manipulate the border as well as all the internal elements.
*Id was removed from Toggle because it really didn't need to be there anyway.
  • Loading branch information
mrichhub committed Mar 18, 2013
1 parent f5422d5 commit fa91cde
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
Stroke="#ffffff"
StrokeThickness="2"
Grid.Column="1"
Name="ToggleCircle"
/>

<Grid Height="40" Width="80" Grid.Column="2">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,20 @@ public Brush Fill
set { SwitchContainer.Fill = value; }
}

[Description("Gets or Sets the foreground brush of all the toggle elements")]
public new Brush Foreground
{
get { return ToggleCircle.Fill; }
set { ToggleCircle.Fill = ToggleCircle.Stroke = ContentRightTextBlock.Foreground = ContentLeftTextBlock.Foreground = value; }
}

[Description("Gets or Sets the border brush")]
public Brush Border
{
get { return SwitchContainer.Stroke; }
set { SwitchContainer.Stroke = value; }
}

private void Toggle_OnTap(object sender, GestureEventArgs e)
{
ToggleSwitch();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ public ToggleDirection InitialDirection
}
}

[Description("A custom identifier for this toggle control. You can set it to whatever you need."), Category("Data")]
public string Id { get; set; }

protected abstract UIElement ToggleSwitchElement { get; }
protected abstract double ToggleLeftMostState { get; }
protected abstract double ToggleRightMostState { get; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("0.1.5.0")]
[assembly: AssemblyFileVersion("0.1.5.0")]
[assembly: AssemblyVersion("0.1.5.2")]
[assembly: AssemblyFileVersion("0.1.5.2")]
[assembly: NeutralResourcesLanguageAttribute("en-US")]
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<StackPanel x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<toggles:RoundedToggle x:Name="RoundedToggle" InitialDirection="Right" ContentLeft="OFF" ContentRight="ON" />
<toggles:RoundedToggle3D x:Name="RoundedToggle3D" Margin="0,12,0,0" ContentLeft="LEFT" ContentRight="RIGHT" ContentForeground="#888888" />
<toggles:RoundedToggleWithInlineOptions x:Name="RoundedToggleInline" Margin="0,12,0,0" ContentLeft="LEFT" ContentRight="RIGHT" Fill="#777F92" />
<toggles:RoundedToggleWithInlineOptions x:Name="RoundedToggleInline" Margin="0,12,0,0" ContentLeft="LEFT" ContentRight="RIGHT" Fill="#777F92" Border="White" />
</StackPanel>

<!--Uncomment to see an alignment grid to help ensure your controls are
Expand Down

0 comments on commit fa91cde

Please sign in to comment.