This file contains hidden or 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
/****************************************************************************** | |
* Name: Taskbar.cs | |
* Description: Class to get the taskbar's position, size and other properties. | |
* Author: Franz Alex Gaisie-Essilfie | |
* based on code from https://winsharp93.wordpress.com/2009/06/29/find-out-size-and-position-of-the-taskbar/ | |
* | |
* Change Log: | |
* Date | Description | |
* -------------|-------------------------------------------------------------- | |
* 2017-05-16 | Initial design |
This file contains hidden or 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
<StackPanel Margin="20" VerticalAlignment="Center"> | |
<Slider IsSelectionRangeEnabled="True" | |
Style="{x:Null}" | |
Maximum="100" | |
Minimum="0" | |
SelectionEnd="60" | |
SelectionStart="30" | |
TickFrequency="10" | |
TickPlacement="TopLeft" | |
Value="50" /> |
This file contains hidden or 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
using System; | |
using System.Diagnostics; | |
using System.Runtime.InteropServices; | |
using System.Windows; | |
using System.Windows.Interop; | |
namespace KinectRun.Host.Controls | |
{ | |
// GameHost is a FrameworkElement and can be added to controls like so: | |
// var gameHost = new GameHost(container.ActualWidth, container.ActualHeight); |
This file contains hidden or 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
private int GetPasswordBoxCaretPostion(PasswordBox passwordBox) | |
{ | |
var infos = passwordBox?.GetType()?.GetProperty("Selection", BindingFlags.NonPublic | BindingFlags.Instance); | |
var selection = infos?.GetValue(passwordBox, null) as TextSelection; | |
var tTextRange = selection?.GetType()?.GetInterfaces()?.Where(x => x.Name == "ITextRange")?.FirstOrDefault(); | |
var oStart = tTextRange?.GetProperty("Start")?.GetGetMethod()?.Invoke(selection, null); | |
var value = oStart?.GetType()?.GetProperty("Offset", BindingFlags.NonPublic | BindingFlags.Instance)?.GetValue(oStart, null) as int?; | |
var caretPosition = value.GetValueOrDefault(0); | |
return caretPosition; | |
} |
This file contains hidden or 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
Intellisense could not be initialized due to the following error: System.ArgumentException: Empty path name is not legal. | |
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) | |
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) | |
at Microsoft.VisualStudio.Text.Implementation.TextDocumentFactoryService.OpenFileGuts(String filePath, DateTime& lastModifiedTimeUtc, Int64& fileSize) | |
at Microsoft.VisualStudio.Text.Implementation.TextDocumentFactoryService.OpenFile(String filePath, DateTime& lastModifiedTimeUtc, Int64& fileSize) | |
at Microsoft.VisualStudio.Text.Implementation.TextDocumentFactoryService.CreateAndLoadTextDocument(String filePath, IContentType contentType, Boolean attemptUtf8Detection, Boolean& characterSubstitutionsOccurred) | |
at Micro |
This file contains hidden or 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
<UniformGrid Columns="4" Rows="3" Grid.Row="0" RenderOptions.ClearTypeHint="Enabled" TextOptions.TextRenderingMode="ClearType"> | |
<Grid HorizontalAlignment="Center" VerticalAlignment="Center"> | |
<Grid.RowDefinitions> | |
<RowDefinition Height="Auto" /> | |
<RowDefinition Height="*" /> | |
</Grid.RowDefinitions> | |
<TextBlock Text="Flip.Normal" | |
Margin="4" | |
FontSize="14" |
This file contains hidden or 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
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:Controls="clr-namespace:MahApps.Metro.Controls" | |
xmlns:Behaviours="clr-namespace:MahApps.Metro.Behaviours" | |
xmlns:Converters="clr-namespace:MahApps.Metro.Converters"> | |
<Converters:ThicknessBindingConverter x:Key="ThicknessBindingConverter" /> | |
<Style x:Key="ExpanderBaseHeaderStyle" TargetType="{x:Type ToggleButton}"> | |
<Setter Property="Background" Value="Transparent" /> |
This file contains hidden or 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
/* | |
* Provides DWM Color as a Bindable Property | |
* Add the Namespace | |
* xmlns:dwmAero="clr-namespace:MahApps.Metro.DWMAero" | |
* And a Resource | |
* <dwmAero:AeroColorProvider x:Key="AeroColorProvider" /> | |
* Then Bind on the Properties (110%,95%,80%,65%,50% Respectively) | |
* Color="{Binding Source={StaticResource AeroColorProvider}, Path=Highlight}" | |
* Color="{Binding Source={StaticResource AeroColorProvider}, Path=Accent}" | |
* Color="{Binding Source={StaticResource AeroColorProvider}, Path=Accent2}" |
This file contains hidden or 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
<!-- for ne metro style --> | |
<Style TargetType="{x:Type DataGridColumnHeadersPresenter}"> | |
<Setter Property="Template"> | |
<Setter.Value> | |
<ControlTemplate TargetType="DataGridColumnHeadersPresenter"> | |
<Grid> | |
<Border IsHitTestVisible="False" | |
BorderThickness="0 0 0 3" | |
Background="Transparent" | |
BorderBrush="{DynamicResource GrayBrush5}" /> |