Rh.PushpinButton.Control 1.0.1

dotnet add package Rh.PushpinButton.Control --version 1.0.1                
NuGet\Install-Package Rh.PushpinButton.Control -Version 1.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Rh.PushpinButton.Control" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Rh.PushpinButton.Control --version 1.0.1                
#r "nuget: Rh.PushpinButton.Control, 1.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Rh.PushpinButton.Control as a Cake Addin
#addin nuget:?package=Rh.PushpinButton.Control&version=1.0.1

// Install Rh.PushpinButton.Control as a Cake Tool
#tool nuget:?package=Rh.PushpinButton.Control&version=1.0.1                

PushpinButtonControl

A pushpin button control for WPF. Has built-in overridable "pinned vs. unpinned" images.
Background and border properties can be set separately for each button state. Based on ToggleButton.

How To Install

Install the nuget package or build Rh.PushpinButton.Control and add reference to it from your application project. Add the namespace mapping xmlns:rh="http://schemas.rollinghours.com/wpf" to the Window element in your XAML file, then use the button like in an example below.

Sample Use

Default:

          <rh:PushpinButton />

No border, custom colors:

          <rh:PushpinButton MouseOverBackground="LightGoldenrodYellow"
                            BorderThickness="0" 
                            PressedBackground="PaleGoldenrod"
                            CheckedBackground="{Binding Background, RelativeSource={RelativeSource Self}}"/>

Custom glyph pics:

          <rh:PushpinButton EnabledPinnedImageSource="pack://application:,,,/MyApp;component/customPinned.png"
                            EnabledUnpinnedImageSource="pack://application:,,,/MyApp;component/customUnpinned.png" />

Unpinned glyph is hidden until mouse hover:

          <rh:PushpinButton Width="Auto" 
                            IsHiddenUnpinnedGlyph="True"
                            CheckedBackground="{Binding Background, RelativeSource={RelativeSource Self}}">
              <TextBlock Text="Hover over"/>
          </rh:PushpinButton>

Transparent:

          <rh:PushpinButton Cursor="Hand" 
                            Background="Transparent" BorderBrush="Transparent"
                            MouseOverBackground="Transparent" 
                            MouseOverBorder="Transparent"
                            PressedBackground="Transparent" 
                            PressedBorder="Transparent"
                            CheckedBackground="Transparent" 
                            CheckedBorder="Transparent" />

A custom styled glyph pic:

          <rh:PushpinButton EnabledPinnedImageSource="{Binding EnabledUnpinnedImageSource, RelativeSource={RelativeSource Self}}"
                            DisabledPinnedImageSource="{Binding DisabledUnpinnedImageSource, RelativeSource={RelativeSource Self}}"
                            DisabledUnpinnedImageSource="{Binding DisabledUnpinnedImageSource, RelativeSource={RelativeSource Self}}">
              <rh:PushpinButton.ImageStyle>
                  <Style TargetType="Image">
                      <Setter Property="RenderTransformOrigin" Value=".5,.5" />
                      <Setter Property="RenderTransform" >
                          <Setter.Value>
                              <RotateTransform Angle="-45" />
                          </Setter.Value>
                      </Setter>
                  </Style>
              </rh:PushpinButton.ImageStyle>
          </rh:PushpinButton>
Product Compatible and additional computed target framework versions.
.NET Framework net40 is compatible.  net403 was computed.  net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 621 3/22/2020
1.0.0 994 3/10/2017

Updated copyright notice