Drawer - class fix
This commit is contained in:
		
							parent
							
								
									f79cc037a8
								
							
						
					
					
						commit
						f4c89aed85
					
				@ -176,12 +176,12 @@ public partial class Drawer : UIComponent, IDisposable, INavigationEventReceiver
 | 
				
			|||||||
		get
 | 
							get
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			return new StyleBuilder()
 | 
								return new StyleBuilder()
 | 
				
			||||||
				.AddStyle(StyleList);
 | 
									.AddStyle(StyleList)
 | 
				
			||||||
			//.AddStyle("width", Width, !string.IsNullOrWhiteSpace(Width) && !Fixed)
 | 
									.AddStyle("width", Width, !string.IsNullOrWhiteSpace(Width) && !Fixed)
 | 
				
			||||||
			//.AddStyle("--mud-drawer-width", Width, !string.IsNullOrWhiteSpace(Width) && (!Fixed || Variant == DrawerVariant.Temporary))
 | 
									.AddStyle("--mud-drawer-width", Width, !string.IsNullOrWhiteSpace(Width) && (!Fixed || Variant == DrawerVariant.Temporary))
 | 
				
			||||||
			//.AddStyle("height", Height, !string.IsNullOrWhiteSpace(Height))
 | 
									.AddStyle("height", Height, !string.IsNullOrWhiteSpace(Height))
 | 
				
			||||||
			//.AddStyle("--mud-drawer-content-height",string.IsNullOrWhiteSpace(Height) ? _height.ToPx() : Height,Anchor == Anchor.Bottom || Anchor == Anchor.Top)
 | 
									.AddStyle("--mud-drawer-content-height", string.IsNullOrWhiteSpace(Height) ? _height.ToPx() : Height, Anchor == Anchor.Bottom || Anchor == Anchor.Top)
 | 
				
			||||||
			//.AddStyle("visibility", "hidden", string.IsNullOrWhiteSpace(Height) && _height == 0 && (Anchor == Anchor.Bottom || Anchor == Anchor.Top));
 | 
									.AddStyle("visibility", "hidden", string.IsNullOrWhiteSpace(Height) && _height == 0 && (Anchor == Anchor.Bottom || Anchor == Anchor.Top));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
@ -359,6 +359,24 @@ public partial class Drawer : UIComponent, IDisposable, INavigationEventReceiver
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/// <summary>
 | 
				
			||||||
 | 
						/// Width of left/right drawer. Only for non-fixed drawers.
 | 
				
			||||||
 | 
						/// </summary>
 | 
				
			||||||
 | 
						[Parameter]
 | 
				
			||||||
 | 
						public string Width { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/// <summary>
 | 
				
			||||||
 | 
						/// Width of left/right drawer. Only for non-fixed drawers.
 | 
				
			||||||
 | 
						/// </summary>
 | 
				
			||||||
 | 
						[Parameter]
 | 
				
			||||||
 | 
						public string MiniWidth { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/// <summary>
 | 
				
			||||||
 | 
						/// Height of top/bottom temporary drawer
 | 
				
			||||||
 | 
						/// </summary>
 | 
				
			||||||
 | 
						[Parameter]
 | 
				
			||||||
 | 
						public string Height { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	#endregion
 | 
						#endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -63,6 +63,22 @@ public partial class DrawerContainer : UIComponent
 | 
				
			|||||||
		return _drawers.FirstOrDefault(d => d.Variant == DrawerVariant.Mini && (d.Anchor == anchor || d.Anchor == Anchor.Right));
 | 
							return _drawers.FirstOrDefault(d => d.Variant == DrawerVariant.Mini && (d.Anchor == anchor || d.Anchor == Anchor.Right));
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						private string GetDrawerWidth(Drawer drawer)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							if (drawer == null)
 | 
				
			||||||
 | 
								return string.Empty;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							return drawer.Width;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						private string GetMiniDrawerWidth(Drawer drawer)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							if (drawer == null)
 | 
				
			||||||
 | 
								return string.Empty;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							return drawer.Width;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	#endregion
 | 
						#endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	#region Styling properties
 | 
						#region Styling properties
 | 
				
			||||||
@ -100,12 +116,11 @@ public partial class DrawerContainer : UIComponent
 | 
				
			|||||||
		get
 | 
							get
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			return new StyleBuilder()
 | 
								return new StyleBuilder()
 | 
				
			||||||
				.AddStyle(StyleList);
 | 
									.AddStyle(StyleList)
 | 
				
			||||||
			//.AddStyle("width", Width, !string.IsNullOrWhiteSpace(Width) && !Fixed)
 | 
									.AddStyle("--mud-drawer-width-left", GetDrawerWidth(FindLeftDrawer()), !string.IsNullOrEmpty(GetDrawerWidth(FindLeftDrawer())))
 | 
				
			||||||
			//.AddStyle("--mud-drawer-width", Width, !string.IsNullOrWhiteSpace(Width) && (!Fixed || Variant == DrawerVariant.Temporary))
 | 
									.AddStyle("--mud-drawer-width-right", GetDrawerWidth(FindRightDrawer()), !string.IsNullOrEmpty(GetDrawerWidth(FindRightDrawer())))
 | 
				
			||||||
			//.AddStyle("height", Height, !string.IsNullOrWhiteSpace(Height))
 | 
									.AddStyle("--mud-drawer-width-mini-left", GetMiniDrawerWidth(FindLeftMiniDrawer()), !string.IsNullOrEmpty(GetMiniDrawerWidth(FindLeftMiniDrawer())))
 | 
				
			||||||
			//.AddStyle("--mud-drawer-content-height",string.IsNullOrWhiteSpace(Height) ? _height.ToPx() : Height,Anchor == Anchor.Bottom || Anchor == Anchor.Top)
 | 
									.AddStyle("--mud-drawer-width-mini-right", GetMiniDrawerWidth(FindRightMiniDrawer()), !string.IsNullOrEmpty(GetMiniDrawerWidth(FindRightMiniDrawer())));
 | 
				
			||||||
			//.AddStyle("visibility", "hidden", string.IsNullOrWhiteSpace(Height) && _height == 0 && (Anchor == Anchor.Bottom || Anchor == Anchor.Top));
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user