Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge #1

Merged
merged 43 commits into from
Apr 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
9800f4a
Change the background color of items when they are added or removed
skendrot Feb 27, 2018
f509f59
extract method for common logic
skendrot Feb 27, 2018
2a8fb42
only need to go from the index the item was inserted/removed
skendrot Feb 27, 2018
10bc325
Ignore items to the end of the list, we'll handle that in another method
skendrot Feb 27, 2018
c6e29be
unsubscribe from events and remove the list when it's been unloaded
skendrot Feb 27, 2018
a23e7fc
move methods to the bottom below changed handlers
skendrot Feb 27, 2018
5c4a588
unsubscribe from all list events when it is unloaded
skendrot Feb 27, 2018
a186ee4
Inherit from HeaderedContentControl to remove duplicate properties
skendrot Mar 16, 2018
714302e
Change default StepFrequency to 1 to match Slider
skendrot Mar 16, 2018
364f239
Change sample to use a regular slider for StepFrequency
skendrot Mar 16, 2018
53eadf5
Added ItemContainerStyleSelector
mashedkeyboard Mar 17, 2018
c36ff1d
Fix for NavigationView SelectedIndex Bug #1905
michael-hawker Mar 19, 2018
b71b6a0
Strectch the content of the expander header to allow for other content
skendrot Mar 19, 2018
a824cff
Merge pull request #1897 from skendrot/ExpanderInheritance
nmetulev Mar 19, 2018
82d31ea
Merge pull request #1898 from skendrot/DefaultStepFrequency
azchohfi Mar 19, 2018
a1fb03e
Merge pull request #1906 from Microsoft/michael-hawker/navviewextensi…
azchohfi Mar 19, 2018
0a157a7
Merge pull request #1907 from skendrot/ExpandExpanderHeader
nmetulev Mar 19, 2018
122ac80
Update PULL_REQUEST_TEMPLATE.md
nmetulev Mar 19, 2018
21c69b7
Use the index from the arguments rather than getting it from the cont…
skendrot Mar 20, 2018
864f205
Get the proper command bar added
skendrot Mar 20, 2018
c3f8461
Extract command logic
skendrot Mar 20, 2018
6ed5e41
Merge pull request #1902 from mashedkeyboard/patch-1
skendrot Mar 20, 2018
5e7fb51
Merge pull request #1852 from skendrot/AlternateColorInsert
Odonno Mar 20, 2018
70ed808
Removing Moldavian
nmetulev Mar 20, 2018
3c58f1c
Merge pull request #1911 from skendrot/MasterDetailsCommandBars
nmetulev Mar 20, 2018
b2c337f
Add Initial HeaderStyle Property to Expander
michael-hawker Mar 21, 2018
5b7e1a2
Move Height of Expander Header into Template
michael-hawker Mar 22, 2018
8ea1ee4
Update Expander Docs
michael-hawker Mar 22, 2018
7987bb0
fixed relative links in docs
nmetulev Mar 22, 2018
66701e8
Merge pull request #1918 from michael-hawker/mhawker/expander-header
Odonno Mar 22, 2018
bd1f492
attempting to fix dependency issue
nmetulev Mar 25, 2018
fbd5c8e
updated version of gitversioning
nmetulev Mar 25, 2018
150b97e
updated gitversioning version
nmetulev Mar 25, 2018
4b92646
revert msbuild.sdk.extras
nmetulev Mar 25, 2018
08f75e2
Removed obsolete comment from build script
nmetulev Mar 27, 2018
24d961e
Merge pull request #1924 from Microsoft/nmetulev/build
nmetulev Mar 27, 2018
5b267ab
Remove duplicate compositeTransform.CenterY
ChrisShaoMeng Apr 2, 2018
3f30bc6
Merge pull request #1934 from ChrisShaoMeng/master
nmetulev Apr 2, 2018
ae7a71c
Merge pull request #1914 from Microsoft/nmetulev/mo
azchohfi Apr 2, 2018
40fbb33
Fixed a NullReferenceException in AdvancedCollectionView Filter
gaunts Apr 3, 2018
b9cdbdc
Merge pull request #1939 from gaunts/hotfix-advCollectionViewNullFilter
nmetulev Apr 4, 2018
ca7895c
Fix crash (#1913).
azchohfi Apr 5, 2018
db7ebf2
Merge pull request #1945 from Microsoft/avoidCrashConnectedAnims
skendrot Apr 6, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Please check if your PR fulfills the following requirements:
- [ ] Sample in sample app has been added / updated (for bug fixes / features)
- [ ] Icon has been created (if new sample) following the [Thumbnail Style Guide and templates](https://github.com/Microsoft/UWPCommunityToolkit-design-assets)
- [ ] Tests for the changes have been added (for bug fixes / features) (if applicable)
- [ ] Header has been added to all new source files (run *build/UpdateHeaders.bat*)
- [ ] Contains **NO** breaking changes


Expand Down
14 changes: 2 additions & 12 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -69,26 +69,16 @@
</Choose>

<PropertyGroup>
<NerdbankGitVersioningVersion>2.0.37-beta</NerdbankGitVersioningVersion>
<NerdbankGitVersioningVersion>2.1.23</NerdbankGitVersioningVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="2.0.37-beta" PrivateAssets="all" />
<PackageReference Include="Nerdbank.GitVersioning" Version=" 2.1.23" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
<AdditionalFiles Include="..\stylecop.json">
<Link>stylecop.json</Link>
</AdditionalFiles>
</ItemGroup>

<!-- https://github.com/NuGet/Home/issues/4337 -->
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' == 'true' ">
<Import Project="$(UserProfile)\.nuget\packages\nerdbank.gitversioning\$(NerdbankGitVersioningVersion)\buildCrossTargeting\Nerdbank.GitVersioning.targets"
Condition="Exists('$(UserProfile)\.nuget\packages\nerdbank.gitversioning\$(NerdbankGitVersioningVersion)\buildCrossTargeting\Nerdbank.GitVersioning.targets')" />
</ImportGroup>
<Target Name="FixUpVersion"
BeforeTargets="_GenerateRestoreProjectSpec"
DependsOnTargets="GetBuildVersion"
Condition=" '$(NerdbankGitVersioningTasksPath)' != '' " />
</Project>
8 changes: 1 addition & 7 deletions Microsoft.Toolkit.Services/Services/Bing/BingLanguage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -661,12 +661,6 @@ public enum BingLanguage
[StringValue("mn")]
Mongolian,

/// <summary>
/// Moldavian
/// </summary>
[StringValue("mo")]
Moldavian,

/// <summary>
/// Marathi
/// </summary>
Expand Down Expand Up @@ -1141,4 +1135,4 @@ public enum BingLanguage
[StringValue("zu")]
Zulu
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
Grid.Column="1"
Minimum="@[Minimum:Slider:0:0-100]@"
Maximum="@[Maximum:Slider:100:0-100]@"
StepFrequency="@[StepFrequency:DoubleSlider:1.0:0.25-10.0]@"/>
StepFrequency="@[StepFrequency:Slider:1:1-10]@"/>
<TextBlock Grid.Column="2"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,14 @@ private void Frame_Navigating(object sender, Windows.UI.Xaml.Navigation.Navigati
if (listAnimProperty.ListViewBase.ItemsSource is IEnumerable<object> items &&
items.Contains(e.Parameter))
{
listAnimProperty.ListViewBase.PrepareConnectedAnimation(props.Key, e.Parameter, listAnimProperty.ElementName);
try
{
listAnimProperty.ListViewBase.PrepareConnectedAnimation(props.Key, e.Parameter, listAnimProperty.ElementName);
}
catch
{
// Ignore
}
}
}
}
Expand Down
1 change: 0 additions & 1 deletion Microsoft.Toolkit.Uwp.UI.Controls/Carousel/Carousel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,6 @@ protected override void PrepareContainerForItemOverride(DependencyObject element
var compositeTransform = new CompositeTransform();
compositeTransform.CenterX = 0.5;
compositeTransform.CenterY = 0.5;
compositeTransform.CenterY = 0.5;

carouselItem.Projection = planeProjection;
carouselItem.RenderTransform = compositeTransform;
Expand Down
39 changes: 12 additions & 27 deletions Microsoft.Toolkit.Uwp.UI.Controls/Expander/Expander.Properties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,6 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
/// </summary>
public partial class Expander
{
/// <summary>
/// Identifies the <see cref="Header"/> dependency property.
/// </summary>
public static readonly DependencyProperty HeaderProperty =
DependencyProperty.Register(nameof(Header), typeof(string), typeof(Expander), new PropertyMetadata(null));

/// <summary>
/// Identifies the <see cref="HeaderTemplate"/> dependency property.
/// </summary>
public static readonly DependencyProperty HeaderTemplateProperty =
DependencyProperty.Register(nameof(HeaderTemplate), typeof(DataTemplate), typeof(Expander), new PropertyMetadata(null));

/// <summary>
/// Identifies the <see cref="IsExpanded"/> dependency property.
/// </summary>
Expand All @@ -50,22 +38,10 @@ public partial class Expander
DependencyProperty.Register(nameof(ContentOverlay), typeof(UIElement), typeof(Expander), new PropertyMetadata(default(UIElement)));

/// <summary>
/// Gets or sets a value indicating whether the Header of the control.
/// </summary>
public string Header
{
get { return (string)GetValue(HeaderProperty); }
set { SetValue(HeaderProperty, value); }
}

/// <summary>
/// Gets or sets a value indicating whether the HeaderTemplate of the control.
/// Identifies the <see cref="HeaderStyle"/> dependency property.
/// </summary>
public DataTemplate HeaderTemplate
{
get { return (DataTemplate)GetValue(HeaderTemplateProperty); }
set { SetValue(HeaderTemplateProperty, value); }
}
public static readonly DependencyProperty HeaderStyleProperty =
DependencyProperty.Register(nameof(HeaderStyle), typeof(Style), typeof(Expander), new PropertyMetadata(default(Style)));

/// <summary>
/// Gets or sets a value indicating whether the content of the control is opened/visible or closed/hidden.
Expand Down Expand Up @@ -94,6 +70,15 @@ public UIElement ContentOverlay
set { SetValue(ContentOverlayProperty, value); }
}

/// <summary>
/// Gets or sets a value for the style to use for the Header of the Expander.
/// </summary>
public Style HeaderStyle
{
get { return (Style)GetValue(HeaderStyleProperty); }
set { SetValue(HeaderStyleProperty, value); }
}

private static void OnIsExpandedPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var expander = d as Expander;
Expand Down
2 changes: 1 addition & 1 deletion Microsoft.Toolkit.Uwp.UI.Controls/Expander/Expander.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
[TemplatePart(Name = LayoutTransformerPart, Type = typeof(LayoutTransformControl))]
[TemplatePart(Name = ContentOverlayPart, Type = typeof(ContentPresenter))]
[ContentProperty(Name = "Content")]
public partial class Expander : ContentControl
public partial class Expander : HeaderedContentControl
{
/// <summary>
/// Initializes a new instance of the <see cref="Expander"/> class.
Expand Down
14 changes: 8 additions & 6 deletions Microsoft.Toolkit.Uwp.UI.Controls/Expander/Expander.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
<Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}" />
<Setter Property="BorderBrush" Value="{ThemeResource SystemControlForegroundTransparentBrush}" />
<Setter Property="BorderThickness" Value="{ThemeResource ToggleButtonBorderThemeThickness}" />
<Setter Property="Height" Value="40" />
<Setter Property="Padding" Value="8,4,8,4" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Stretch" />
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
Expand Down Expand Up @@ -251,10 +253,11 @@
ContentTemplate="{TemplateBinding ContentTemplate}"
ContentTransitions="{TemplateBinding ContentTransitions}"
Content="{TemplateBinding Content}"
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
Padding="{TemplateBinding Padding}"
VerticalAlignment="{TemplateBinding VerticalAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="Left"
RenderTransformOrigin="0.5,0.5" />
</Grid>
</ControlTemplate>
Expand All @@ -265,6 +268,7 @@
<Style TargetType="controls:Expander">
<Setter Property="Header" Value="Header" />
<Setter Property="IsTabStop" Value="False" />
<Setter Property="HeaderStyle" Value="{StaticResource HeaderToggleButtonStyle}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="controls:Expander">
Expand Down Expand Up @@ -580,11 +584,9 @@
<RotateTransform x:Name="RotateLayoutTransform" Angle="0" />
</controls:LayoutTransformControl.Transform>
<ToggleButton x:Name="PART_ExpanderToggleButton"
Height="40"
TabIndex="0"
AutomationProperties.Name="Expand"
Style="{StaticResource HeaderToggleButtonStyle}"
VerticalAlignment="Bottom" HorizontalAlignment="Stretch"
Style="{TemplateBinding HeaderStyle}"
Foreground="{TemplateBinding Foreground}"
ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}"
IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,31 +332,26 @@ private void SetDetailsContent()

private void OnMasterCommandBarChanged()
{
var panel = GetTemplateChild("DetailsCommandBarPanel") as Panel;
if (panel == null)
{
return;
}

panel.Children.Clear();
if (DetailsCommandBar != null)
{
panel.Children.Add(DetailsCommandBar);
}
OnCommandBarChanged("MasterCommandBarPanel", MasterCommandBar);
}

private void OnDetailsCommandBarChanged()
{
var panel = GetTemplateChild("MasterCommandBarPanel") as Panel;
OnCommandBarChanged("DetailsCommandBarPanel", DetailsCommandBar);
}

private void OnCommandBarChanged(string panelName, CommandBar commandbar)
{
var panel = GetTemplateChild(panelName) as Panel;
if (panel == null)
{
return;
}

panel.Children.Clear();
if (MasterCommandBar != null)
if (commandbar != null)
{
panel.Children.Add(MasterCommandBar);
panel.Children.Add(commandbar);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
Grid.Row="1"
IsTabStop="False"
ItemContainerStyle="{TemplateBinding ItemContainerStyle}"
ItemContainerStyleSelector="{TemplateBinding ItemContainerStyleSelector}"
ItemTemplate="{TemplateBinding ItemTemplate}"
ItemTemplateSelector="{TemplateBinding ItemTemplateSelector}"
ItemsSource="{TemplateBinding ItemsSource}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
public class RangeSelector : Control
{
private const double Epsilon = 0.01;
private const double DefaultStepFrequency = 0.01;
private const double DefaultStepFrequency = 1;

/// <summary>
/// Identifies the Minimum dependency property.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -534,16 +534,19 @@ private void HandleSortChanged()

private void HandleFilterChanged()
{
for (var index = 0; index < _view.Count; index++)
if (_filter != null)
{
var item = _view.ElementAt(index);
if (_filter(item))
for (var index = 0; index < _view.Count; index++)
{
continue;
}
var item = _view.ElementAt(index);
if (_filter(item))
{
continue;
}

RemoveFromView(index, item);
index--;
RemoveFromView(index, item);
index--;
}
}

var viewHash = new HashSet<object>(_view);
Expand Down
Loading