Welcome Guest Search | Active Topics | Sign In | Register

TabControl TabItem Close button not working for theme eo:ThemeManager.SkinName="VS2012" Options
Raju
Posted: Thursday, May 4, 2017 7:00:53 AM
Rank: Newbie
Groups: Member

Joined: 5/4/2017
Posts: 5
Hi,

I was working with EO:TabControl and here's the XAML Code
<eo:TabControl x:Name="mainTabs" eo:ThemeManager.SkinName="Chrome" eo:WindowChrome.IsClientElement="True"
ShowNewTabButton="True" ShowCloseTabButton="True" PreviewItemClose="mainTabs_PreviewItemClose">


when I set theme eo:ThemeManager.SkinName="Chrome", PreviewItemClose event works fine.
when I set theme eo:ThemeManager.SkinName="VS2012", PreviewItemClose event doesn't fire.
when I set theme eo:ThemeManager.SkinName="", PreviewItemClose event doesn't fire.

Also,
<Style TargetType="eo:TabItem">
<Setter Property="AllowDrop" Value="True"/>
<EventSetter Event="PreviewMouseMove" Handler="TabItem_PreviewMouseMove"/>
<EventSetter Event="Drop" Handler="TabItem_Drop"/>
</Style>

when I set theme eo:ThemeManager.SkinName="VS2012", PreviewMouseMove event works fine.
when I set theme eo:ThemeManager.SkinName="Chrome", PreviewMouseMove event doesn't fire.



Could you please help me to resolve this issue with TabbedBrowser sample?
Also, I would like to get the xaml file where Chrome or VS2012 theme are defined .



thanks,
Raju
eo_support
Posted: Thursday, May 4, 2017 2:39:52 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Hi,

We tested this on our latest build and it seems to work fine. Which version are you trying?

Thanks!
Raju
Posted: Friday, May 5, 2017 6:08:31 AM
Rank: Newbie
Groups: Member

Joined: 5/4/2017
Posts: 5
Hi,

I was using earlier version.
I updated to latest version and still issues persists.

Raju
Posted: Friday, May 5, 2017 6:14:14 AM
Rank: Newbie
Groups: Member

Joined: 5/4/2017
Posts: 5
I have two issues

ISSUE #1

-------XAML CODE --------
<eo:TabControl x:Name="mainTabs" eo:ThemeManager.SkinName="Chrome" eo:WindowChrome.IsClientElement="True"
ShowNewTabButton="True" ShowCloseTabButton="True" PreviewItemClose="mainTabs_PreviewItemClose">


when I set theme eo:ThemeManager.SkinName="Chrome", PreviewItemClose event works fine.
when I set theme eo:ThemeManager.SkinName="VS2012", PreviewItemClose event doesn't fire.
when I set theme eo:ThemeManager.SkinName="", PreviewItemClose event doesn't fire.

ISSUE #2
-------XAML CODE --------
<Style TargetType="eo:TabItem">
<Setter Property="AllowDrop" Value="True"/>
<EventSetter Event="PreviewMouseMove" Handler="TabItem_PreviewMouseMove"/>
<EventSetter Event="Drop" Handler="TabItem_Drop"/>
</Style>


when I set theme eo:ThemeManager.SkinName="VS2012", PreviewMouseMove event works fine.
when I set theme eo:ThemeManager.SkinName="Chrome", PreviewMouseMove event doesn't fire.
eo_support
Posted: Friday, May 5, 2017 7:58:38 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Hi,

I am not sure what else to tell you. We tested them here and it works fine. You should not set SkinName to "" though. You can leave it out so that it will automatically pick a skin, but do not explicitly set it to empty.

If the problem continues and you already have a license, please PM your order number and we will see what we can do.

Thanks!
Raju
Posted: Friday, May 5, 2017 11:11:56 AM
Rank: Newbie
Groups: Member

Joined: 5/4/2017
Posts: 5
Hi,

If you insist its working there, I will uninstall EO and have fresh installation and test it again next week.

I am not using SkinName to "".

I am working for client and testing its features before client decides to buy license.

I hope you could help us fixing issues with theme. I would revert back with fixes if you could share theme XAML file.

thanks,
Raju
eo_support
Posted: Friday, May 5, 2017 11:40:18 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Hi,

The TabControl in fact does not have VS2012 skin at all. Only the DockContainer/DockView control has VS2012 skin. When you set a TabControl's theme to VS2012, it defaults back to the "Aero" skin.

The key to trigger PreviewItemClose event is in the tab header there must be a BareButton with ID set to PART_CloseTab. If for some reason you have altered the TabItem's content template and does not have this part in your template, PreviewItemClose event will not fire.

PreviewMouseMove should always work --- that event is not even triggered by us. It's triggered by WPF and we do not have anything to do with it. You can try to set the event handler directly on the TabControl instead of using a style setter and see if it works.

If you still have problems, try to isolate the problem into a test project and send the test project to us. See here for more details:

https://www.essentialobjects.com/forum/test_project.aspx

We will take a look once we receive the test project.

Thanks
Raju
Posted: Monday, May 8, 2017 4:17:54 AM
Rank: Newbie
Groups: Member

Joined: 5/4/2017
Posts: 5
Hi,

I have done fresh installation of Visual Studio and EO Objects and yet it doesn't worked.


I am including test project for you to test at your environment.
I have added comments on XAML file for your perusal.


with regards,
Raju
eo_support
Posted: Tuesday, May 9, 2017 2:55:10 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Hi,

We have looked into the test project you sent to us. The root of the problem is the style you apply to eo:TabItem type. The difference between the Chrome skin and the Aero skin is the Chrome skin override this style. In another word, if Chrome skin is selected, a built-in style is automatically applied to eo:TabItem (in order to implement the chrome tab border shape). This overrides and disables your style thus disables your TabItem_PreviewMouseMove event handler. To resolve this issue, you can try to dynamically attach event handler with code after the style is applied.

When Aero skin is not used, your style is correctly applied and your PreviewMouseMove event handler is correctly fired. However you can not have drag drop and mouse click event on the same element. Once you call DragDrop.DoDragDrop in your PreviewMouseMove event handler, it automatically disables click event on that element. This is why your PreviewItemClose is not fired in this case. To resolve this issue, you will need to attach your event handler to only a portion of the tab item (for example, just the text part) instead of the whole tab item.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.