Click here to Skip to main content
15,912,072 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to make the program do not minimized at all minimized windows? Pin
BillWoodruff21-Oct-11 17:16
professionalBillWoodruff21-Oct-11 17:16 
AnswerRe: How to make the program do not minimized at all minimized windows? Pin
Eddy Vluggen21-Oct-11 23:18
professionalEddy Vluggen21-Oct-11 23:18 
GeneralRe: How to make the program do not minimized at all minimized windows? Pin
BillWoodruff21-Oct-11 23:39
professionalBillWoodruff21-Oct-11 23:39 
GeneralRe: How to make the program do not minimized at all minimized windows? Pin
Eddy Vluggen21-Oct-11 23:53
professionalEddy Vluggen21-Oct-11 23:53 
AnswerRe: How to make the program do not minimized at all minimized windows? Pin
Blue_Boy20-Oct-11 23:06
Blue_Boy20-Oct-11 23:06 
AnswerRe: How to make the program do not minimized at all minimized windows? Pin
PIEBALDconsult21-Oct-11 2:47
mvePIEBALDconsult21-Oct-11 2:47 
AnswerRe: How to make the program do not minimized at all minimized windows? Pin
Slavik_ns21-Oct-11 3:02
Slavik_ns21-Oct-11 3:02 
QuestionCreate custom shaped buttons in WPF Pin
abyclassic20-Oct-11 20:01
abyclassic20-Oct-11 20:01 
Hello,

I need to create a custom shaped button which looks like a forward arrow. Three or four of such buttons are to be placed next to each other in such a way that the tip of the first button is just near the tail of the next button


I have made a style for the button using polygon in .xaml & assigned this style to the button. Now, if i add this button to a form, i can see this button in the desired style.
But, still the button has the rectangular shape, which is not visible as the borders & remaining area are transparent. So, the button occupies a rectangular area on the form irrespective of the style which i created.

Because of this, i cannot keep the forward shaped butons next to each other, as close as desired. Here, for the tip of one forward button to come near the tail of the next button, the rectangular area of the buttons must overlap, which is not correct.


Is there any way to remove the rectangular area of the button & make it exactly to occupy the desired shape as specified by the style.


The .xaml file for my code is given below

HTML
<Window x:Class="Styles.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="150" Width="525">
    <Window.Resources>
<Style x:Key="Poly1" TargetType="{x:Type Button}">
        	<Setter Property="Template">
        		<Setter.Value>
        			<ControlTemplate TargetType="{x:Type Button}">
        				<Grid>
                            <Polygon Fill="{TemplateBinding Background}"  Points="10,10 80,10 120,45 80,75 10,75 45,45" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="2"/>
        					<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        				</Grid>
        				<ControlTemplate.Triggers>
        					<Trigger Property="IsFocused" Value="True"/>
        					<Trigger Property="IsDefaulted" Value="True"/>
        					<Trigger Property="IsMouseOver" Value="True"/>
        					<Trigger Property="IsPressed" Value="True"/>
        					<Trigger Property="IsEnabled" Value="False"/>
        				</ControlTemplate.Triggers>
        			</ControlTemplate>
        		</Setter.Value>
        	</Setter>
        </Style>
</Window.Resources>
<WrapPanel>
        <Button Style="{DynamicResource Poly1}"></Button>
        <Button Style="{DynamicResource Poly1}"></Button>
 </WrapPanel>
</Window>

Best Regards,
Abhilash

AnswerRe: Create custom shaped buttons in WPF Pin
OriginalGriff20-Oct-11 21:32
mveOriginalGriff20-Oct-11 21:32 
AnswerRe: Create custom shaped buttons in WPF Pin
Abhinav S21-Oct-11 2:40
Abhinav S21-Oct-11 2:40 
GeneralRe: Create custom shaped buttons in WPF Pin
abyclassic23-Oct-11 22:29
abyclassic23-Oct-11 22:29 
QuestionDisplaying vertical rows to bind data Pin
AditSheth20-Oct-11 18:54
AditSheth20-Oct-11 18:54 
AnswerRe: Displaying vertical rows to bind data Pin
Richard MacCutchan20-Oct-11 21:43
mveRichard MacCutchan20-Oct-11 21:43 
QuestionCan someone please tell me why the eventlog part of this doesn't work? Pin
CCodeNewbie20-Oct-11 11:54
CCodeNewbie20-Oct-11 11:54 
QuestionRe: Can someone please tell me why the eventlog part of this doesn't work? Pin
Luc Pattyn20-Oct-11 13:55
sitebuilderLuc Pattyn20-Oct-11 13:55 
AnswerRe: Can someone please tell me why the eventlog part of this doesn't work? Pin
CCodeNewbie20-Oct-11 21:51
CCodeNewbie20-Oct-11 21:51 
GeneralRe: Can someone please tell me why the eventlog part of this doesn't work? Pin
Luc Pattyn21-Oct-11 1:59
sitebuilderLuc Pattyn21-Oct-11 1:59 
AnswerRe: Can someone please tell me why the eventlog part of this doesn't work? Pin
BobJanova20-Oct-11 22:30
BobJanova20-Oct-11 22:30 
AnswerRe: Can someone please tell me why the eventlog part of this doesn't work? Pin
phil.o21-Oct-11 0:30
professionalphil.o21-Oct-11 0:30 
AnswerRe: Can someone please tell me why the eventlog part of this doesn't work? - Solved Pin
CCodeNewbie22-Oct-11 9:49
CCodeNewbie22-Oct-11 9:49 
QuestionI am having some basic compile issues defining a BorderBrush. Pin
Xarzu20-Oct-11 7:37
Xarzu20-Oct-11 7:37 
AnswerRe: I am having some basic compile issues defining a BorderBrush. Pin
Manfred Rudolf Bihy20-Oct-11 7:52
professionalManfred Rudolf Bihy20-Oct-11 7:52 
GeneralRe: I am having some basic compile issues defining a BorderBrush. Pin
Xarzu20-Oct-11 12:15
Xarzu20-Oct-11 12:15 
AnswerRe: I am having some basic compile issues defining a BorderBrush. Pin
Alisaunder20-Oct-11 18:34
Alisaunder20-Oct-11 18:34 
AnswerRe: I am having some basic compile issues defining a BorderBrush. Pin
BobJanova20-Oct-11 22:27
BobJanova20-Oct-11 22:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.