<Grid Grid.Row="0" > <ScrollViewer HorizontalScrollBarVisibility="Visible"> <ItemsControl ItemsSource="{Binding UsercontrolCollectionDetails, UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <WrapPanel ScrollViewer.HorizontalScrollBarVisibility="Visible" ScrollViewer.VerticalScrollBarVisibility="Visible" HorizontalAlignment="Left" VerticalAlignment="Top"/> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> </ItemsControl> </Grid>
private void root_MouseMove(object sender, MouseEventArgs e) { var element = sender as UcNetworkLayoutGraphicalView; if (isInDrag && element != null && e.LeftButton == MouseButtonState.Pressed) { currentPoint = e.GetPosition(null); var window = Window.GetWindow(this); if (currentPoint.X > 10 && currentPoint.X < window.ActualWidth - 25 && currentPoint.Y > 10 && currentPoint.Y < window.ActualHeight - 85) { transform.X += currentPoint.X - anchorPoint.X; transform.Y += (currentPoint.Y - anchorPoint.Y); this.RenderTransform = transform; anchorPoint = currentPoint; } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)