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

Question: How to globally set breakpoints in C# code #5

Open
neilmispelaar opened this issue May 12, 2020 · 0 comments
Open

Question: How to globally set breakpoints in C# code #5

neilmispelaar opened this issue May 12, 2020 · 0 comments

Comments

@neilmispelaar
Copy link

Hi there,

Is there an easy way that I am missing that could globally set the breakpoints (XS_SM, SM_MD, MD_LG) to different values?

The following code works, however, then I have to manually add the breakpoints to the XAML every time I use the ResponsiveGrid element.

<ge:ResponsiveGrid
        Breakpoints="400,600,800">
        ...
</ge:ResponsiveGrid>

My alternative was to create a local partial override class, however the XAML doesn't look very pretty:

    public partial class ResponsiveGridEx : ResponsiveGrid {          
        public ResponsiveGridEx() : base()
        {
            // Set the new breakpoints here 
            this.BreakPoints.XS_SM = (double)200;
            this.BreakPoints.SM_MD = (double)400;
            this.BreakPoints.MD_LG = (double)600;
        }
    }

However, the only issue with this is the XAML doesn't look very pretty as it has a namespace for local intermixed with the ge namespace

<local:ResponsiveGridEx>
        <Border ge:ResponsiveGrid.XS="12" ge:ResponsiveGrid.SM="3" ge:ResponsiveGrid.MD="1"/>
        <Border ge:ResponsiveGrid.XS="12" ge:ResponsiveGrid.SM="6" ge:ResponsiveGrid.MD="10"/>
        <Border ge:ResponsiveGrid.XS="12" ge:ResponsiveGrid.SM="3" ge:ResponsiveGrid.MD="1"/>
</local:ResponsiveGridEx>
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

1 participant