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

CompositeStateTrigger cannot have AdaptiveTrigger in collection #47

Closed
sibbl opened this issue Sep 20, 2015 · 21 comments
Closed

CompositeStateTrigger cannot have AdaptiveTrigger in collection #47

sibbl opened this issue Sep 20, 2015 · 21 comments

Comments

@sibbl
Copy link

sibbl commented Sep 20, 2015

Unfortunately the following code does not work, but I'd love to have setters for e.g. "desktop device family and window width greater than 500px":

<VisualState.StateTriggers>
    <windowsStateTriggers:CompositeStateTrigger Operator="And">
        <windowsStateTriggers:DeviceFamilyStateTrigger DeviceFamily="Desktop" />
        <AdaptiveTrigger MinWindowWidth="500" />
    </windowsStateTriggers:CompositeStateTrigger>
</VisualState.StateTriggers>

Is there anything that can be done?

@Rexobias
Copy link

I have the same question.

@tibitoth
Copy link
Contributor

We can't use the AdaptiveTrigger in CompositeStateTrigger, because it isn't implement the ITriggerValue interface. I think we need to reimplement this trigger.

@tibitoth
Copy link
Contributor

I created a pull request #48 with ITriggerValue implementation.

@dotMorten
Copy link
Owner

@totht91 Thanks nice job, but is there a reason we wouldn't just still call it "AdaptiveTrigger" ?

@tibitoth
Copy link
Contributor

We can call it 👍

@Rexobias
Copy link

Thank you ;)

@tibitoth
Copy link
Contributor

NP. But it's not merged yet.

@sibbl
Copy link
Author

sibbl commented Nov 7, 2015

@dotMorten may I ask why this is still not merged? It would be good for this project to have the AdaptiveTrigger merged, wouldn't it?

@tibitoth
Copy link
Contributor

It's feel like an abandoned repo.

@dotMorten
Copy link
Owner

@sibbl or like WPF it's 'mature' :) The question I asked last wasn't answered.

@tibitoth
Copy link
Contributor

So WindowsStateTriggers is mature?

@sibbl
Copy link
Author

sibbl commented Jan 20, 2016

If I'm correct, you, @dotMorten, want @totht91 to rename the CompositableAdaptiveTrigger to AdaptiveTrigger, right? Or are you waiting for more changes to merge the new PR and release the new version on Nuget?

@tibitoth
Copy link
Contributor

@sibbl
Copy link
Author

sibbl commented Jan 20, 2016

Oh, indeed - sorry, @totht91. Okay, what answer for which question are you then waiting for, @dotMorten? ;)

@ndeeH
Copy link

ndeeH commented Jan 25, 2016

Please update the nuget version. Thank you.

@dotMorten
Copy link
Owner

merged and nuget updated

@genfa
Copy link

genfa commented Feb 7, 2016

Hello, I'm currently trying to use the trigger in a UWP with several resolutions
<WindowsStateTriggers:CompositeStateTrigger Operator="And" > <WindowsStateTriggers:AdaptiveTrigger MinWindowWidth="100"/> <WindowsStateTriggers:DeviceFamilyStateTrigger DeviceFamily="Desktop"/> </WindowsStateTriggers:CompositeStateTrigger>
with the latest nugget package (02/02) but only the first visualstate is executed. Do you have a example to use the composite trigger?

@tibitoth
Copy link
Contributor

tibitoth commented Feb 7, 2016

What do you mean "only the first visualstate is executed"? Your sample (min window width and device family) is worked for me flawlessly.

@genfa
Copy link

genfa commented Feb 7, 2016

If a second visual state is defined with a different resolution
<WindowsStateTriggers:CompositeStateTrigger Operator="And" > <WindowsStateTriggers:AdaptiveTrigger MinWindowWidth="500"/> <WindowsStateTriggers:DeviceFamilyStateTrigger DeviceFamily="Desktop"/> </WindowsStateTriggers:CompositeStateTrigger>
and I resize my app while running, to more then 500, the visual state is not applied. If I use only the builtin <AdaptativeTrigger>, everything run fine.
For my app, I use a VisualState for Phone (with the DeviceFamilyStateTrigger), and the other ones for the desktop without the DeviceFamilyStateTrigger and with the builtin AdaptativeTrigger.

@dotMorten
Copy link
Owner

Could you please open an issue and post a full sample that demonstrates the problem?
I'm terrible at guessing reproducers ;-)

@genfa
Copy link

genfa commented Feb 8, 2016

I'll do it this evening.
A reproductible bug is half resolved :)

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

6 participants