Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button inside HyperlinkButton not working #239

Open
deepaksm1 opened this issue Feb 3, 2016 · 5 comments
Open

Button inside HyperlinkButton not working #239

deepaksm1 opened this issue Feb 3, 2016 · 5 comments

Comments

@deepaksm1
Copy link

If we are placing Button control inside HyperlinkButton control as a content (see below example). Button command or event does not work in Fayde. Same scenario works in silverlight.

<HyperlinkButton TargetName="_blank" NavigateUri="{Binding Path=FileUri}">

   <Button Height="32" Width="32" HorizontalAlignment="Right"
                                                  VerticalAlignment="Top"                                                  
                                                  Tag="Delete"                                                  
                                                  Command="{Binding Path=DeleteFileCommand}"
                                                  CommandParameter="{Binding }" />

  </HyperlinkButton>

Using fayde version:0.19.7

@opcodewriter
Copy link

Just checking, is the Uri given by FIleUri showing in the hyperlink?

@opcodewriter
Copy link

Why are you even using a Button inside a HyperlinkButton?
It doesn't make sense.

@deepaksm1
Copy link
Author

I am showing file list using hyperlink button, After clicking on blue box file should be open in new window and want delete file button inside hyperlink blue box to delete file as shown in screenshot.

filelist

@opcodewriter
Copy link

I've never seen a UI where a button sits on top of another button.

Anyway, instead of having Button inside HyperlinkButton, why don't you create a Control which wraps the Hyperlink and the delete button?
Something like this

<Grid>
     <HyperlinkButton />
      <Button Tag="Delete" VerticalAlignment="Top" HorizontalAlignement="Right"  />
</Grid>

Also, note you don't need to put Width and Height on the Button, because of the alignment it should take the icon image size.

@deepaksm1
Copy link
Author

Yes this is alternate solution, Thanks, but above scenario works in silverlight that's why I was trying it. Anyway I am going to implement your solution. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants