Posts

Share:

Create Custom Dialog Box In WPF | Saatody | Amit Padhiyar

Making a custom dialog box in WPF which is too easy. It is secure and can't focusable its own window until it opend. MainWindow.xaml <Window x:Class="WpfApp10.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:WpfApp10" mc:Ignorable="d" Title="MainWindow" Height="450" Width="800"> <Grid> <Button Content="Button" HorizontalAlignment="Left" Margin="459,85,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click"/> </Grid> </Window> MainWindow.xaml.cs using System; using System

Static Self Object For Every Class - Amit Padhiyar - Saatody

Self is object name of itself class. For example, If developer create two objects in two different classes. Then if you want use non static method and those objects are newly created. So If first object value is X. and second object value is Y. But here, The problem is if you create third object and try to access value of first or second class object then you will get null object so self object help you to retrieve first or second class value. public class ClassName{ public static ClassName Self = null; } I declare some rules to use Self object. Don't use Self object in origin class. public class ClassName{ public string MSG = "Hello WPF!"; public static ClassName Self = null; public void print(){ // Wrong System.Console.WriteLine("MSG: " + Self.MSG); // Right System.Console.WriteLine("MSG: " + MSG); } } Error could occur due to below example public class ClassName{ publi

WPF UI Libraries List - Amit Padhiyar - Saatody

mahapps.metro Controls MetroWindow Buttons ContextMenu DataGrid Dialogs FlipView Flyouts NumericUpDown ProgressBar ProgressRing RangeSlider Slider SplitButton and DropDownButton TabControl TextBox Tile ToggleButton ToggleSwitch TransitioningContentControl Badged Controls Website:  https://mahapps.com/ Website:  https://github.com/MahApps/MahApps.Metro License: Commercial use And Modification Allow Kinnara ModernWpf Controls Button Calendar CheckBox ComboBox ContextMenu DataGrid DatePicker Expander GroupBox ListBox ListView Menu MenuItem PasswordBox ProgressBar RadioButton RepeatButton RichTextBox ScrollBar ScrollViewer Slider TabControl TextBox ToggleButton ToolTip TreeView Window AutoSuggestBox AppBarButton AppBarToggleButton BitmapIcon CommandBar CommandBarFlyout ContentDialog DropDownButton Flyout FontIcon HyperlinkButton ItemsRepeater LayoutPanel NumberBox PathIcon PersonPicture ProgressRing

RightEffect.cs | Drag Object To Scroll In WPF C# | Amit Padhiyar | Saatody

RightEffect.cs Drag object using MouseLeftButtonDown, MouseLeftButtonUp and MouseMove. When we drag object using mouse and if object's any part is going outside parent panel then the parent panel margin automatically update and try to in that object. using System; using System.Windows; using System.Windows.Controls; using System.Windows.Shapes; using System.Windows.Media; using System.Windows.Input; namespace EffectFeatures { public class RightEffect : Border { public void Initialize() { try { Repaint(); Resize(); Event(); Refresh(); } catch (Exception e) { } } public void Repaint() { try { this.Background = new SolidColorBrush(Color.FromArgb(100, 255, 165, 0)); this.BorderBrush = new SolidColorBrush(Color.FromArgb(255, 255, 165, 0)); this.BorderTh

RightEffectRow.cs | Drag Object To Scroll In WPF C# | Amit Padhiyar | Saatody

RightEffectRow.cs Drag object using MouseLeftButtonDown, MouseLeftButtonUp and MouseMove. When we drag object using mouse and if object's any part is going outside parent panel then the parent panel margin automatically update and try to in that object. using System; using System.Windows; using System.Windows.Controls; using System.Windows.Shapes; using System.Windows.Media; using System.Windows.Input; using System.Collections.Generic; using System.Windows.Threading; namespace EffectFeatures { public class RightEffectRow : Grid { public RightEffect RE = new RightEffect(); public static UIElement UI = new UIElement(); public void Initialize() { try { this.Children.Clear(); Repaint(); Resize(); Event(); Refresh(); UI = this; this.Children.Add(RE); RE.Initialize(); }

RightEffectRowContainer.cs | Drag Object To Scroll In WPF C# | Amit Padhiyar | Saatody

RightEffectRowContainer.cs Drag object using MouseLeftButtonDown, MouseLeftButtonUp and MouseMove. When we drag object using mouse and if object's any part is going outside parent panel then the parent panel margin automatically update and try to in that object. using System; using System.Windows; using System.Windows.Controls; using System.Windows.Shapes; using System.Windows.Media; using System.Windows.Input; using System.Windows.Threading; namespace EffectFeatures { public class RightEffectRowContainer : Grid { public void Initialize() { try { this.Children.Clear(); Repaint(); Resize(); Event(); Refresh(); } catch (Exception e) { } } public void Repaint() { try { LinearGradientBrush gradientBrush = new LinearGradientBrush(Color.FromRgb(100, 0, 0), Color.FromRgb

RightEffectControl.cs | Drag Object To Scroll In WPF C# | Amit Padhiyar | Saatody

RightEffectControl.cs Drag object using MouseLeftButtonDown, MouseLeftButtonUp and MouseMove. When we drag object using mouse and if object's any part is going outside parent panel then the parent panel margin automatically update and try to in that object. using System; using System.Windows; using System.Windows.Controls; using System.Windows.Shapes; using System.Windows.Media; using System.Windows.Input; using System.Collections.Generic; namespace EffectFeatures { public class RightEffectControl { public RightEffectRowContainer RERC = new RightEffectRowContainer(); public List<RightEffectRow> RER = new List<RightEffectRow>(); private double Y = 0; private int Counter = 0; public void AddRow() { RightEffectRow _RER = new RightEffectRow(); _RER.HorizontalAlignment = HorizontalAlignment.Left; _RER.VerticalAlignment = VerticalAlignment.Top; _RER.Margin = new Thic