Hello,
I have a simple question. When you create a ProWindow, is it possible to set its snapshot to load on click? Rather, maybe some position setting on the screen.
Thank you for answer
David
Solved! Go to Solution.
Hi,
How to handle loaded event in WPF here:
You can set ProWindow position in xaml or in code. ProWIndow is derived from Window.
In xaml you can use WindowStartupLocation:
<controls:ProWindow x:Class="YourWindowView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:controls="clr-namespace:ArcGIS.Desktop.Framework.Controls;assembly=ArcGIS.Desktop.Framework"
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:extensions="clr-namespace:ArcGIS.Desktop.Extensions;assembly=ArcGIS.Desktop.Extensions"
mc:Ignorable="d"
Title="Window name" MinWidth="550"
WindowStartupLocation="CenterOwner"
d:DataContext="{Binding Path=vm.YourWindowViewModel}"
SizeToContent="Height" Width="550"
>
It has few alternatives. More info here:
In code you can do like this:
var window = new YourProWindow();
window.Left = 100;
window.Top = 100;
window.ShowDialog();
Hi,
How to handle loaded event in WPF here:
You can set ProWindow position in xaml or in code. ProWIndow is derived from Window.
In xaml you can use WindowStartupLocation:
<controls:ProWindow x:Class="YourWindowView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:controls="clr-namespace:ArcGIS.Desktop.Framework.Controls;assembly=ArcGIS.Desktop.Framework"
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:extensions="clr-namespace:ArcGIS.Desktop.Extensions;assembly=ArcGIS.Desktop.Extensions"
mc:Ignorable="d"
Title="Window name" MinWidth="550"
WindowStartupLocation="CenterOwner"
d:DataContext="{Binding Path=vm.YourWindowViewModel}"
SizeToContent="Height" Width="550"
>
It has few alternatives. More info here:
In code you can do like this:
var window = new YourProWindow();
window.Left = 100;
window.Top = 100;
window.ShowDialog();
Thank you!