Click here to Skip to main content
15,891,864 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: How awesome would it be if... Pin
Mike Marynowski10-Aug-09 2:48
professionalMike Marynowski10-Aug-09 2:48 
GeneralRe: How awesome would it be if... Pin
Nader Elshehabi10-Aug-09 2:54
Nader Elshehabi10-Aug-09 2:54 
QuestionI want to see best practise c# project in wpf with db Pin
TGiril7-Aug-09 6:25
TGiril7-Aug-09 6:25 
AnswerRe: I want to see best practise c# project in wpf with db Pin
Super Lloyd7-Aug-09 15:01
Super Lloyd7-Aug-09 15:01 
QuestionMouseUp-Event doesn't react on left mouse button Pin
MyPiano7-Aug-09 5:40
MyPiano7-Aug-09 5:40 
AnswerRe: MouseUp-Event doesn't react on left mouse button Pin
Mark Salsbery7-Aug-09 7:42
Mark Salsbery7-Aug-09 7:42 
GeneralRe: MouseUp-Event doesn't react on left mouse button Pin
MyPiano7-Aug-09 7:58
MyPiano7-Aug-09 7:58 
GeneralRe: MouseUp-Event doesn't react on left mouse button Pin
Mark Salsbery7-Aug-09 8:43
Mark Salsbery7-Aug-09 8:43 
MyPiano wrote:
for me its most annoying that the MouseEvents on most controls don't work


hmm....I don't know about anyone else, but if that were true, WPF would
be pretty useless to me.


MyPiano wrote:
On the Image control it's the same


These events fire just fine for me:
<Image Name="theImage" Source="Images/Silverlight_Logo.jpg" Stretch="None" MouseLeftButtonDown="theImage_MouseLeftButtonDown" MouseLeftButtonUp="theImage_MouseLeftButtonUp"  />


MyPiano wrote:
I don't know how to set an Image on a button.


Here's an example of one way, using an image as the button's content:
<Button HorizontalAlignment="Center" VerticalAlignment="Center" >
    <Image Source="Images/Silverlight_Logo.jpg" Stretch="None" />
</Button>



MyPiano wrote:
It would be indeed a possibility. But then I have to redesign most of the program


Redesign? It would be a matter of simply adding a style and using buttons
with that style in place of your label that acts like a button:
<Style x:Key="LabelButtonStyle" TargetType="Button">
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="Cursor" Value="Hand"/>
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="Button">
                <Grid>
                    <Label Content="{TemplateBinding Content}" />
                </Grid>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>

...

<Button Name="labelButton" Style="{StaticResource LabelButtonStyle}" Content="Label Button" Click="labelButton_Click" />


Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: MouseUp-Event doesn't react on left mouse button [modified] Pin
MyPiano7-Aug-09 10:22
MyPiano7-Aug-09 10:22 
GeneralRe: MouseUp-Event doesn't react on left mouse button Pin
Mark Salsbery7-Aug-09 11:41
Mark Salsbery7-Aug-09 11:41 
GeneralRe: MouseUp-Event doesn't react on left mouse button Pin
MyPiano7-Aug-09 12:14
MyPiano7-Aug-09 12:14 
GeneralRe: MouseUp-Event doesn't react on left mouse button Pin
Mark Salsbery7-Aug-09 13:13
Mark Salsbery7-Aug-09 13:13 
GeneralRe: MouseUp-Event doesn't react on left mouse button Pin
MyPiano8-Aug-09 8:02
MyPiano8-Aug-09 8:02 
QuestionDatabinding in Silverlight with databases other than with SQL Server Pin
pisanis7-Aug-09 4:53
pisanis7-Aug-09 4:53 
AnswerRe: Databinding in Silverlight with databases other than with SQL Server [modified] Pin
Mike Marynowski7-Aug-09 6:30
professionalMike Marynowski7-Aug-09 6:30 
AnswerRe: Databinding in Silverlight with databases other than with SQL Server [modified] Pin
Mark Salsbery7-Aug-09 7:23
Mark Salsbery7-Aug-09 7:23 
AnswerRe: Databinding in Silverlight with databases other than with SQL Server Pin
Michael Sync8-Aug-09 6:08
Michael Sync8-Aug-09 6:08 
GeneralDynamically loading Silverlight UserControl from a single.xap [modified] Pin
Amit Rai Sharma6-Aug-09 23:37
Amit Rai Sharma6-Aug-09 23:37 
QuestionNeed just idea or suggestion can u help me? Pin
wasimsharp6-Aug-09 23:12
wasimsharp6-Aug-09 23:12 
AnswerRe: Need just idea or suggestion can u help me? Pin
#realJSOP7-Aug-09 0:54
mve#realJSOP7-Aug-09 0:54 
QuestionNeed an advice about starting a raster drawing program with WPF Pin
Cristoff6-Aug-09 22:54
Cristoff6-Aug-09 22:54 
AnswerRe: Need an advice about starting a raster drawing program with WPF Pin
#realJSOP7-Aug-09 0:57
mve#realJSOP7-Aug-09 0:57 
GeneralRe: Need an advice about starting a raster drawing program with WPF Pin
Cristoff7-Aug-09 2:23
Cristoff7-Aug-09 2:23 
GeneralRe: Need an advice about starting a raster drawing program with WPF PinPopular
#realJSOP7-Aug-09 3:43
mve#realJSOP7-Aug-09 3:43 
GeneralRe: Need an advice about starting a raster drawing program with WPF Pin
Cristoff7-Aug-09 3:53
Cristoff7-Aug-09 3:53 

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.