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 answerDavid
Hi,
How to handle loaded event in WPF here:
https://docs.microsoft.com/en-us/dotnet/desktop/wpf/advanced/how-to-handle-a-loaded-event?view=netframeworkdesktop-4.8
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:
https://docs.microsoft.com/en-us/dotnet/api/system.windows.window.windowstartuplocation?view=netframework-4.8
In code you can do like this:
var window = new YourProWindow(); window.Left = 100; window.Top = 100; window.ShowDialog();
Thank you!
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.