Skip to content

Commit

Permalink
fix Transitioning Content Control DPI issue (#2827)
Browse files Browse the repository at this point in the history
RenderTargetBitmap take an int therefore the minimum input value must be 1.
  • Loading branch information
ChrisPulman committed Jul 12, 2021
1 parent de9557f commit 663110c
Show file tree
Hide file tree
Showing 12 changed files with 667 additions and 429 deletions.
@@ -0,0 +1,12 @@
<UserControl
x:Class="ReactiveUI.Tests.Wpf.FirstView"
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:local="clr-namespace:ReactiveUI.Tests.Wpf"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Width="450"
Height="450"
mc:Ignorable="d">
<Grid Background="#FFF80606" />
</UserControl>
@@ -0,0 +1,20 @@
// Copyright (c) 2021 .NET Foundation and Contributors. All rights reserved.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using System.Windows.Controls;

namespace ReactiveUI.Tests.Wpf
{
/// <summary>
/// Interaction logic for FirstView.xaml.
/// </summary>
public partial class FirstView : UserControl
{
public FirstView()
{
InitializeComponent();
}
}
}
@@ -0,0 +1,12 @@
<UserControl
x:Class="ReactiveUI.Tests.Wpf.SecondView"
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:local="clr-namespace:ReactiveUI.Tests.Wpf"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Width="0.5"
Height="0.5"
mc:Ignorable="d">
<Grid Background="#FFF7E40D" />
</UserControl>
@@ -0,0 +1,20 @@
// Copyright (c) 2021 .NET Foundation and Contributors. All rights reserved.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using System.Windows.Controls;

namespace ReactiveUI.Tests.Wpf
{
/// <summary>
/// Interaction logic for SecondView.xaml.
/// </summary>
public partial class SecondView : UserControl
{
public SecondView()
{
InitializeComponent();
}
}
}
@@ -0,0 +1,20 @@
<rxui:ReactiveWindow
x:Class="ReactiveUI.Tests.Wpf.TCMockWindow"
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:local="clr-namespace:ReactiveUI.Tests.Wpf"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:rxui="http://reactiveui.net"
Title="DPITest"
Width="600"
Height="600"
x:TypeArguments="local:TCMockWindowViewModel"
mc:Ignorable="d">
<Grid>
<rxui:TransitioningContentControl
x:Name="TransitioningContent"
Width="500"
Height="500" />
</Grid>
</rxui:ReactiveWindow>
@@ -0,0 +1,18 @@
// Copyright (c) 2021 .NET Foundation and Contributors. All rights reserved.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

namespace ReactiveUI.Tests.Wpf
{
/// <summary>
/// Interaction logic for MainWindow.xaml.
/// </summary>
public partial class TCMockWindow
{
public TCMockWindow()
{
InitializeComponent();
}
}
}
@@ -0,0 +1,11 @@
// Copyright (c) 2021 .NET Foundation and Contributors. All rights reserved.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

namespace ReactiveUI.Tests.Wpf
{
public class TCMockWindowViewModel : ReactiveObject
{
}
}
14 changes: 7 additions & 7 deletions src/ReactiveUI.Tests/Platforms/wpf/Mocks/WpfTestWindow.cs
Expand Up @@ -4,17 +4,17 @@
// See the LICENSE file in the project root for full license information.

using System.Windows;
using System.Windows.Controls;

using System.Windows.Controls;

namespace ReactiveUI.Tests.Wpf
{
public class WpfTestWindow : Window, IActivatableView
{
public WpfTestWindow()
{
RootGrid = new Grid();

AddChild(RootGrid);
public WpfTestWindow()
{
RootGrid = new Grid();

AddChild(RootGrid);
}

public Grid RootGrid { get; }
Expand Down

0 comments on commit 663110c

Please sign in to comment.