Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Other Programming Languages If you have a coding issue to discuss about another language that really isn't provided for in any other forum here (not ASP.NET C#, C++, VB, PHP, JavaScript, Python, Java, Perl, Applescript, XML or any of the other forum topics we have), post it here. Enough discussion on a language we don't have covered could prompt a new forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Other Programming Languages section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old May 13th, 2016, 02:08 PM
Registered User
Points: 18, Level: 1
Points: 18, Level: 1 Points: 18, Level: 1 Points: 18, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2016
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
Default wpf grid selection

how can I use adorners to implement selection
Reply With Quote
  #2 (permalink)  
Old May 14th, 2016, 06:29 AM
Registered User
Points: 17, Level: 1
Points: 17, Level: 1 Points: 17, Level: 1 Points: 17, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2016
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default re. wpf selection

Quote:
Originally Posted by alexandarx5 View Post
how can I use adorners to implement selection
I recommend dapfor as the best grid product for handling this task. It looks more natural than creating a frame around every single row. All semi-transparency rules for focused rows apply to selection as well.
XAML
<!-- Selection brushes -->
<SolidColorBrush x:Key="SelectionBorderBrush" Color="#ffffea00"/>
<LinearGradientBrush x:Key="SelectionBrush" EndPoint="0,1" StartPoint="0,0">
<GradientStop Color="#12ffea00" Offset="0" />
<GradientStop Color="#27ffea00" Offset="0.4" />
<GradientStop Color="#12ffea00" Offset="1" />
</LinearGradientBrush>

<!--GridControl-->
<Style TargetType="{x:Type controls:GridControl}">
<Setter Property="AppearanceSelectionBackground" Value="{StaticResource SelectionBrush}"/>
<Setter Property="AppearanceSelectionBorder" Value="{StaticResource SelectionBorderBrush}"/>
<Setter Property="AppearanceSelectionBorderThickness" Value="0.8"/>
</Style>
Reply With Quote




Similar Threads
Thread Thread Starter Forum Replies Last Post
What is WCF, WPF? vbboyd BOOK: Beginning ASP.NET 4 : in C# and VB 6 August 28th, 2014 12:12 PM
What is WCF, WPF? vbboyd ASP.NET 4 General Discussion 0 April 26th, 2012 11:47 AM
sessionParameter for SUB-selection, inflicts on primary selection Aung ASP.NET 3.5 Basics 0 May 3rd, 2011 09:20 AM
WCF/WPF ashish_26 ASP.NET 3.5 Professionals 0 August 6th, 2009 05:41 AM
wpf+c#(kind help) vinothkumar124 Windows Presentation Foundation 0 December 16th, 2008 08:06 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.