コード例 #1
0
 private void SetBreakpointValues(ResizableOption value, params Breakpoint[] breakpoints)
 {
     foreach (var breakpoint in breakpoints)
     {
         this.breakpointDictionary[breakpoint] = value;
     }
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FluentResizable"/> class.
 /// </summary>
 /// <param name="initialValue">The initial <see cref="ResizableOption"/> across all media query breakpoints.</param>
 public FluentResizable(ResizableOption initialValue)
 {
     this.breakpointDictionary.Add(Breakpoint.Mobile, initialValue);
     this.breakpointDictionary.Add(Breakpoint.Tablet, initialValue);
     this.breakpointDictionary.Add(Breakpoint.Desktop, initialValue);
     this.breakpointDictionary.Add(Breakpoint.Widescreen, initialValue);
     this.breakpointDictionary.Add(Breakpoint.FullHD, initialValue);
 }
コード例 #3
0
 /// <inheritdoc/>
 public IFluentResizable OnMobileAndLarger(ResizableOption option)
 {
     this.SetBreakpointValues(option, Breakpoint.Mobile, Breakpoint.Tablet, Breakpoint.Desktop, Breakpoint.Widescreen, Breakpoint.FullHD);
     return(this);
 }
コード例 #4
0
 /// <inheritdoc/>
 public IFluentResizable OnMobile(ResizableOption option)
 {
     this.breakpointDictionary[Breakpoint.Mobile] = option;
     return(this);
 }
コード例 #5
0
 /// <inheritdoc/>
 public IFluentResizable OnFullHD(ResizableOption option)
 {
     this.breakpointDictionary[Breakpoint.FullHD] = option;
     return(this);
 }
コード例 #6
0
 /// <inheritdoc/>
 public IFluentResizable OnDesktopAndSmaller(ResizableOption option)
 {
     this.SetBreakpointValues(option, Breakpoint.Mobile, Breakpoint.Tablet, Breakpoint.Desktop);
     return(this);
 }
コード例 #7
0
 /// <inheritdoc/>
 public IFluentResizable OnDesktop(ResizableOption option)
 {
     this.SetBreakpointValues(option, Breakpoint.Desktop);
     return(this);
 }
コード例 #8
0
 /// <inheritdoc/>
 public IFluentResizable OnWidescreenAndLarger(ResizableOption option)
 {
     this.SetBreakpointValues(option, Breakpoint.Widescreen, Breakpoint.FullHD);
     return(this);
 }
コード例 #9
0
 /// <inheritdoc/>
 public IFluentResizable OnWidescreen(ResizableOption option)
 {
     this.breakpointDictionary[Breakpoint.Widescreen] = option;
     return(this);
 }
コード例 #10
0
 /// <inheritdoc/>
 public IFluentResizable OnTablet(ResizableOption option)
 {
     this.breakpointDictionary[Breakpoint.Tablet] = option;
     return(this);
 }