Silverlight Drag & Drop with different zoom levels

1 reply. Last post: December 26, 2011 11:03 PM by Yudi
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback

Hi, this may be related to a similar post "ComboBox dropdown positioning under Silverlight". I have attached a simple example which works perfectly under Silverlight when the zoom level is set to 100%. However when I select another level, say 120%, the drag/drop operations become erratic or stop working. Specifically I can no longer drag from the left tree and drop on the right tree. I am running Windows 7 on a 120DPI monitor.  Thanks, Jonathan

<UserControl x:Class="SilverlightApplication14.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
 xmlns:Intersoft="clr-namespace:Intersoft.Client.UI.Controls.Interactivity;assembly=Intersoft.Client.UI.Controls.Interactivity">
 <UserControl.Resources>
 <ItemsPanelTemplate x:Key="ItemsPanelTemplate1">
 <Intersoft:UXStackPanel Orientation="Vertical" AllowMoveItem="True" AllowDropItem="True" AllowReorderItem="True" AllowRemoveItem="True" />
 </ItemsPanelTemplate>
 <ItemsPanelTemplate x:Key="ItemsPanelTemplate2">
 <Intersoft:UXStackPanel Orientation="Vertical" AllowMoveItem="True" AllowDropItem="True" AllowReorderItem="True" />
 </ItemsPanelTemplate>
 </UserControl.Resources>
 <Grid>
 <Grid.ColumnDefinitions>
 <ColumnDefinition Width="*" />
 <ColumnDefinition Width="*" />
 </Grid.ColumnDefinitions>
 <Controls:TreeView x:Name="t1" Grid.Column="0" ItemsPanel="{StaticResource ItemsPanelTemplate1}">
 <Controls:TreeViewItem Header="Item 1" />
 <Controls:TreeViewItem Header="Item 2" ItemsPanel="{StaticResource ItemsPanelTemplate1}">
 <Controls:TreeViewItem Header="Item 2.1" />
 <Controls:TreeViewItem Header="Item 2.2" />
 <Controls:TreeViewItem Header="Item 2.3" />
 </Controls:TreeViewItem>
 <Controls:TreeViewItem Header="Item 3" />
 </Controls:TreeView>
 <Controls:TreeView x:Name="t2" Grid.Column="1" ItemsPanel="{StaticResource ItemsPanelTemplate2}">
 <Controls:TreeViewItem Header="Item 1" />
 <Controls:TreeViewItem Header="Item 2" ItemsPanel="{StaticResource ItemsPanelTemplate2}">
 <Controls:TreeViewItem Header="Item 2.1" />
 <Controls:TreeViewItem Header="Item 2.2" />
 <Controls:TreeViewItem Header="Item 2.3" />
 </Controls:TreeViewItem>
 <Controls:TreeViewItem Header="Item 3" />
 </Controls:TreeView>
 </Grid>
</UserControl>

 

All times are GMT -5. The time now is 8:05 PM.
Previous Next