Skip to content

Commit 873b6b9

Browse files
punker76timunie
authored andcommitted
Update file headers and format code
1 parent 6d34b6b commit 873b6b9

19 files changed

+229
-266
lines changed

src/MahApps.Metro.Demo_v2/App.xaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Application x:Class="MahApps.Metro.Demo_v2.App"
22
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4-
xmlns:local="clr-namespace:MahApps.Metro.Demo_v2"
54
xmlns:avalon="http://icsharpcode.net/sharpdevelop/avalonedit"
5+
xmlns:local="clr-namespace:MahApps.Metro.Demo_v2"
66
StartupUri="MainWindow.xaml">
77
<Application.Resources>
88
<ResourceDictionary>
@@ -16,19 +16,19 @@
1616
</ResourceDictionary.MergedDictionaries>
1717

1818
<Style BasedOn="{StaticResource {x:Type avalon:TextArea}}" TargetType="{x:Type avalon:TextArea}">
19-
<Setter Property="SelectionBrush">
19+
<Setter Property="SelectionBorder">
2020
<Setter.Value>
21-
<SolidColorBrush Opacity="0.7" Color="{DynamicResource MahApps.Colors.Highlight}" />
21+
<Pen Brush="{DynamicResource MahApps.Brushes.Highlight}" Thickness="1" />
2222
</Setter.Value>
2323
</Setter>
24-
<Setter Property="SelectionBorder">
24+
<Setter Property="SelectionBrush">
2525
<Setter.Value>
26-
<Pen Brush="{DynamicResource MahApps.Brushes.Highlight}" Thickness="1" />
26+
<SolidColorBrush Opacity="0.7" Color="{DynamicResource MahApps.Colors.Highlight}" />
2727
</Setter.Value>
2828
</Setter>
2929
<Setter Property="SelectionForeground" Value="{DynamicResource MahApps.Brushes.IdealForeground}" />
3030
</Style>
31-
31+
3232
</ResourceDictionary>
3333
</Application.Resources>
3434
</Application>
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Configuration;
4-
using System.Data;
5-
using System.Linq;
6-
using System.Threading.Tasks;
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
// See the LICENSE file in the project root for more information.
4+
75
using System.Windows;
86

97
namespace MahApps.Metro.Demo_v2
@@ -14,4 +12,4 @@ namespace MahApps.Metro.Demo_v2
1412
public partial class App : Application
1513
{
1614
}
17-
}
15+
}
Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
// See the LICENSE file in the project root for more information.
4+
15
using System.Windows;
26

37
[assembly: ThemeInfo(
48
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
5-
//(used if a resource is not found in the page,
6-
// or application resource dictionaries)
9+
//(used if a resource is not found in the page,
10+
// or application resource dictionaries)
711
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
8-
//(used if a resource is not found in the page,
9-
// app, or any theme specific resource dictionaries)
10-
)]
12+
//(used if a resource is not found in the page,
13+
// app, or any theme specific resource dictionaries)
14+
)]
Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
using ICSharpCode.AvalonEdit;
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
// See the LICENSE file in the project root for more information.
4+
5+
using ICSharpCode.AvalonEdit;
26
using MahApps.Demo.Core;
3-
using System;
4-
using System.Collections.Generic;
57
using System.Collections.ObjectModel;
68
using System.Diagnostics;
7-
using System.Linq;
8-
using System.Text;
9-
using System.Threading.Tasks;
109
using System.Windows;
1110
using System.Windows.Controls;
1211

@@ -22,12 +21,10 @@ public class DemoView : HeaderedContentControl
2221

2322
/// <summary>Identifies the <see cref="HyperlinkOnlineDocs"/> dependency property.</summary>
2423
public static readonly DependencyProperty HyperlinkOnlineDocsProperty = DependencyProperty.Register(nameof(HyperlinkOnlineDocs), typeof(string), typeof(DemoView), new PropertyMetadata(null));
25-
26-
2724

2825
public DemoView()
2926
{
30-
DemoProperties.CollectionChanged += DemoProperties_CollectionChanged;
27+
this.DemoProperties.CollectionChanged += this.DemoProperties_CollectionChanged;
3128
}
3229

3330
public ObservableCollection<DemoViewProperty> DemoProperties { get; } = new ObservableCollection<DemoViewProperty>();
@@ -38,43 +35,42 @@ private void DemoProperties_CollectionChanged(object sender, System.Collections.
3835
{
3936
foreach (DemoViewProperty item in e.NewItems)
4037
{
41-
item.PropertyChanged += DemoProperties_ItemPropertyChanged;
38+
item.PropertyChanged += this.DemoProperties_ItemPropertyChanged;
4239
}
4340
}
41+
4442
if (e.OldItems != null)
4543
{
4644
foreach (DemoViewProperty item in e.OldItems)
4745
{
48-
item.PropertyChanged -= DemoProperties_ItemPropertyChanged;
46+
item.PropertyChanged -= this.DemoProperties_ItemPropertyChanged;
4947
}
5048
}
5149
}
5250

5351
private void DemoProperties_ItemPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
5452
{
55-
SetExampleXaml();
53+
this.SetExampleXaml();
5654
}
5755

58-
59-
6056
public string ExampleXaml
6157
{
62-
get { return (string)GetValue(ExampleXamlProperty); }
63-
set { SetValue(ExampleXamlProperty, value); }
58+
get => (string)this.GetValue(ExampleXamlProperty);
59+
set => this.SetValue(ExampleXamlProperty, value);
6460
}
6561

6662
private void SetExampleXaml()
6763
{
68-
if (PART_AvalonEdit != null)
64+
if (this.PART_AvalonEdit != null)
6965
{
70-
var exampleText = ExampleXaml;
66+
var exampleText = this.ExampleXaml;
7167

72-
foreach (var item in DemoProperties)
68+
foreach (var item in this.DemoProperties)
7369
{
7470
exampleText = exampleText.Replace($"[{item.PropertyName}]", item.GetExampleXamlContent());
7571
}
7672

77-
PART_AvalonEdit.Text = exampleText;
73+
this.PART_AvalonEdit.Text = exampleText;
7874
}
7975
}
8076

@@ -88,8 +84,8 @@ private static void OnExampleXamlChanged(DependencyObject d, DependencyPropertyC
8884

8985
public string HyperlinkOnlineDocs
9086
{
91-
get { return (string)GetValue(HyperlinkOnlineDocsProperty); }
92-
set { SetValue(HyperlinkOnlineDocsProperty, value); }
87+
get => (string)this.GetValue(HyperlinkOnlineDocsProperty);
88+
set => this.SetValue(HyperlinkOnlineDocsProperty, value);
9389
}
9490

9591
public SimpleCommand NavigateToOnlineDocs { get; } = new SimpleCommand(
@@ -100,9 +96,8 @@ public override void OnApplyTemplate()
10096
{
10197
base.OnApplyTemplate();
10298

103-
PART_AvalonEdit = GetTemplateChild(nameof(PART_AvalonEdit)) as TextEditor;
104-
SetExampleXaml();
99+
this.PART_AvalonEdit = this.GetTemplateChild(nameof(this.PART_AvalonEdit)) as TextEditor;
100+
this.SetExampleXaml();
105101
}
106-
107102
}
108-
}
103+
}

0 commit comments

Comments
 (0)