|
I found this post too and some others. But i can´t find a solution for my problem. I found an example which is almost i want.
The border in this solution is very "light" but i need a solid border. I tried alot but i didn´t hit the correct switches.
So can someone point me to the right way?
<Style x:Key="RedGlowItemContainer" TargetType="{x:Type ListViewItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListViewItem}">
<Border Background="Black" CornerRadius="4" BorderThickness="1" x:Name="IconBorder" Margin="1,1,1,1" >
<ContentPresenter />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="true">
<Setter TargetName="IconBorder" Property="BitmapEffect">
<Setter.Value>
<OuterGlowBitmapEffect GlowColor="White" GlowSize="5"/>
</Setter.Value>
</Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
|
|
|
|
|
Check the documentation for the different properties of a Border control. Change the colour, increase the thickness etc.
It's time for a new signature.
|
|
|
|
|
Hi guys/Girls,
i am working in a project , where i need to show the hyperlink with some colors(i will change dynamically), but i need to remove the underline of the
hyperlink. Please help me peoples...
Thanks in advance..
yours
hema
|
|
|
|
|
Use stype for Hyperlink:
<Style TargetType="{x:Type Hyperlink}">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Foreground" Value="DarkSlateBlue" />
</Trigger>
</Style.Triggers>
<Setter Property="Foreground" Value="SteelBlue" />
<Setter Property="TextBlock.TextDecorations" Value="{x:Null}" />
</Style>
------------------------------
<TextBlock><Hyperlink NavigateUri="http://msdn.microsoft.com/library">Navigate to MSDN</Hyperlink></TextBlock>
Parwej Ahamad
ahamad.parwej@gmail.com
|
|
|
|
|
Hi Hema,
You can easily remove the underline from the hyperlink just set the property TextDecorations = "None" of hyperlink. And to change the color of hyperlink dynamically you can set the color in setter. I have used same in grid and working fine.
Hope the above will help you.
<Style x:Key="DataGridHyperlinkStyle" TargetType="{x:Type Hyperlink}">
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type WpfToolkit:DataGridRow}}, Path=IsSelected}" Value="true">
<Setter Property="Foreground" Value="White"/>
</DataTrigger>
</Style.Triggers>
</Style>
|
|
|
|
|
Hi there,
I am new to WPF, I have just learned how to customize the progressbar by using a control template. I made it so that the indicator part of the progressbar has a gradient effect.
Now i actually want it to fade in as the value increase, I know that I can make use of the triggers on the value of the progress bar and set the opacity of the indicator, but i am not sure how that can be done.
Also, I would like to have a box following the top of the indicator to indicate the value of the progessbar, my approach is to create another column from the grid, place a textbox inside, and then again using trigger change the coordinates of the box. But i am not sure how i can convert the value of the progressbar to the coordinates of the textbox.
here is what i have so far
<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
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"
mc:Ignorable="d"
x:Class="IceControls.CivicProgressbar"
x:Name="UserControl" d:DesignHeight="492" Width="50">
<UserControl.Resources>
<ControlTemplate x:Key="templateThermometer"
TargetType="{x:Type ProgressBar}">
<ControlTemplate.Resources>
<LinearGradientBrush x:Key="brushStem"
StartPoint="0 0" EndPoint="7 0">
<LinearGradientBrush.Transform>
<RotateTransform Angle="90"></RotateTransform>
</LinearGradientBrush.Transform>
<GradientStop Offset="0" Color="white" />
<GradientStop Offset="1" Color="transparent" />
</LinearGradientBrush>
</ControlTemplate.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100*" />
</Grid.ColumnDefinitions>
<Border Grid.Column="0" BorderBrush="Gray"
BorderThickness="1 1 1 1"
CornerRadius="6 6 0 0" >
<Decorator Name="PART_Track">
<Border Name="PART_Indicator"
CornerRadius="6 6 0 0"
VerticalAlignment="Bottom"
Background="{StaticResource brushStem}" />
</Decorator>
</Border>
</Grid>
</Grid>
</ControlTemplate>
</UserControl.Resources>
<StackPanel>
<ProgressBar Template="{StaticResource templateThermometer}"
Orientation="Vertical" Minimum="0" Maximum="100"
Width="auto" Height="350" Margin="0,0,0,0"
Value="{Binding ElementName=scroll,Path=Value}" />
<ScrollBar x:Name="scroll" Orientation="vertical"
Minimum="0" Maximum="100"
SmallChange="1" LargeChange="10"
Margin="16.5,0" Height="120.5" />
</StackPanel>
</UserControl>
|
|
|
|
|
I've created a user-control for WPF using C#. Control has a warning MessageBox, which I want to appear only if it is being used by some EXE, but it should not appear while developing. So basically, it should appear the way it appears for unregistered controls. Currently it is appearing in both development/runtime. How can I do that?
|
|
|
|
|
I use the following simple test:
_designMode = DesignerProperties.GetIsInDesignMode(new Button())
|| Application.Current == null
|| Application.Current.GetType() == typeof(Application);
if (!_designMode)
{
var designMode = DesignerProperties.IsInDesignModeProperty;
_designMode = (bool)DependencyPropertyDescriptor.FromProperty(designMode, typeof(FrameworkElement)).Metadata.DefaultValue;
}
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
That works, thanks!
|
|
|
|
|
You're welcome.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Hi,
After installing Silverlight Tools I have Silverlight Application template is missing. The only templates are present Silverlight Class Library, Silverlight Navigation Application and Silverlight Unit Test Application. I already tried to uninstal and reinstall without any success, template still missing. Any idea how to fix it without rebuilding my PC?
Thanks,
Alex
|
|
|
|
|
Which version of Visual Studio are you using?
If it is VS 2008, make sure you have SP1 installed. Try reinstalling the SL toolkit.
Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
|
|
|
|
|
It's VS 2008 with SP1 installed, and I already tried twice to reinstall
|
|
|
|
|
Open the visual studio command prompt and run this - devenv /ResetSettings.
Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
|
|
|
|
|
Done it, this thing anly copy from \ProjectTemplateCash and if Cash wrong too it will not fix anything
|
|
|
|
|
Hi,
Apologies this is a general question, and I am looking for a ball-park answer.
I have a little experience in MATLAB, a little experience in C, good experience in SQL, and no experience with C#, .xaml, or WPF.
I have a project at work to develop an application in C# WPF that will need to examine and modify values in a SQL database. A fair part of this project involves me learning the necessary skills.
So 2 questions:
1) How long would you expect me to need to spend to get my skills up to scratch?
2) What resources would you recommend are best? In your experience is there significant benefit to attending a course on these subjects to speed learning up?
So far I have read (and done examples from) a C# .NET in 24 hours book, and feel like I have only a basic understanding.
Cheers
Tim
|
|
|
|
|
|
Thanks for the speedy response, had a brief look and the links are very useful.
Afraid I've not even done any real OOP programming before. Messed about with some VBA but that is about as close as it gets.
Also the amount of time I'm likely to get for this at work is probably around 1 day a week, plus some time outside of work if I'm able. With this in mind do you still think 2-3 months, or would 2-3 months be the estimate for studying this stuff full time?
Cheers
Tim
|
|
|
|
|
Even 2-3 months is not enough to learn everything of C# and WPF. It is all depend opon your technichal skill or we can say your grasping power.
But I would suggest before going to any implement any module try to filter information from google or codeproject that what is the best wayt to implement as your requirement.
Keep posting with proper/requirement information on this forum so here experts can suggest and reply you quickly.
If you are stucking somewhere then feel free to post here, we are happy to help you.
Keep studying to grasp basic/core concept of C# including his 3.5/4.0 feature as well for WPF. I am sure when you are going to implement it you will difenitly start thinking in your classic way as you have experience. But again I am saying try to find out what is the best way to implement it.
Thanks for your patience!
Parwej Ahamad
ahamad.parwej@gmail.com
|
|
|
|
|
Tim - learning WPF is a huge undertaking. I was an experienced ASP.NET and WinForms developer long before I looked at WPF, and it took me well over a year before it properly clicked into place. I think 2-3 months, given your limited experience, is wildly overoptimistic.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Hey Pete,
I have been helping out with interviews for my employer recently. I'm moving on to a new organisation in a few weeks so have been interviewing for my replacement.
One chap I interviewed a few weeks ago said that he didn't have any WPF experience but could pick it up in a day ... the level of arrogance was unprecedented as far as I'm concerned. Needless to say we hired the other guy.
Unbelieveable.
|
|
|
|
|
Jammer wrote: he didn't have any WPF experience but could pick it up in a day
I assume he meant he'd be able to spell it out in the right order in that time. I knew a contractor who told me he'd blag it in an interview and get a job doing WPF. He was mightily pissed with me when I threw questions at him like what constraints are in place if you want to use a dependency property, why are DPs different to properties, how do you retemplate a control, and the like? This level of arrogance just serves to piss me off; it took me a very very long time to get to grips with WPF, and I'm lucky enough to be able to have conversations with the likes of Josh, Karl, Sacha, Dan Vaughan and the likes.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Couldn't agree more Pete, I was in disbelief hearing those words!
|
|
|
|
|
I agree with Pete completely. I started my forays into OO and WPF at the same time, Jan 2008. I still know jack and believe me I've put a LOT more time in than you have available.
Do you have access to a full blown Visual Studio or just C# Express?
This is a HUGE undertaking on your part and do not underestimate what you are taking on. Come back with some more information and then we can come up with a plan of attack.
Cheers,
|
|
|
|
|
I've got access to a full blown Visual Studio 2008 at work, along with SQL server 2008.
The aim, and approach from my manager (he's not a programmer) is to learn just as much as necessary to be able to do a reasonable job designing a new application. It's an internal application that is replacing a couple of horrific Access tools, and would only be used by less than 20 people in the UK, AUS, and USA.
The use of the tool is for Product Managers to be able to submit requests to load details of new products onto our CRM system. This will consist of a SQL Server back-end to hold details of the request. I believe there will be about 7 tables needed for details of the product and linked attributes, price lists, etc, and maybe one or 2 more for Lists of Values.
Some required features include:
- Multiple datagrids that must filter based on which record is selected above (I managed to do this but to be honest don't fully understand how it works)
- Combobox fields in the datagrid that are linked to the CRM system to retrieve available values
- Fields in datagrid to be read only depending on other database values
- Automatic validation of requests upon submission, returning list of problems found
- Hyperlinks in datagrids to take user to specified request
- Routed events will be needed to control elements of the UI (I've been using
The other half of the tool is for use by IS to actually load the products to the CRM. This will be done using comms. Due to the complexity of Siebel CRM whenever data is uploaded it is always via comms instead of directly with update statements. This is another thing I will have to learn to write.
The main difficulty I have is that when I find solutions I often find that I don't have the base level of understanding so can find it extremely difficult to follow people's suggestions! Also worth mentioning that one of the guys in development who has worked with WPF (though not with datagrids) has a couple of hours available per week to help me out with random questions, which can be very helpful.
My general tactic so far has been partly to focus on getting specific proof of concepts up and running that I know I'll need, and partly to slog through books to get an understanding of some of the more fundamental knowledge that generally helps when writing C#/.xaml.
I'm trying to arrange with the guy in dev to actually go through some practicals for some of this stuff, so I can hound him with questions and try to get a bit of a better understanding.
Any suggestions for how you guys picked this stuff up would be really helpful. Currently I feel like I'm a bit out on a limb being the first person to learn any C# in IS!
Cheers
Tim
|
|
|
|