Skip to content

Commit ef5f5e9

Browse files
Merge pull request #7022 from syncfusion-content/988608-samples
988608: Updated the code snippet of our component
2 parents ba86816 + 5fbf36d commit ef5f5e9

File tree

5 files changed

+35
-6
lines changed

5 files changed

+35
-6
lines changed

blazor/chat-ui/header.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ The [HeaderIconCss](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inte
8989
};
9090
}
9191
92+
<style>
93+
#chatui-header .e-header .e-header-icon {
94+
display: flex;
95+
}
96+
</style>
97+
9298
```
9399

94100
![Blazor Chat UI HeaderIconCss](./images/header-iconCss.png)
1.93 KB
Loading

blazor/ribbon/backstage.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,7 @@ Customize backstage menu items and their content using the [Template](https://he
852852
{
853853
if (backstageMenus.TryGetValue(id, out var menuItem))
854854
{
855-
selectedContent = menuItem.name;
855+
selectedContent = menuItem.name.ToLowerInvariant();
856856
}
857857
}
858858

@@ -863,16 +863,22 @@ Customize backstage menu items and their content using the [Template](https://he
863863
new DropDownMenuItem{ Text = "Keep Text Only" }
864864
};
865865

866-
RenderFragment GetBackstageContent(string item) => item switch
866+
private RenderFragment RenderWrapperContent(string icon, string name, string description) => @<div class="section-content">
867+
<span class="e-icons @icon doc_icon"></span>
868+
<span>@name</span>
869+
<div class="desc" style="font-size:12px;color:#555;margin-left:26px;">@description</div>
870+
</div>;
871+
872+
RenderFragment GetBackstageContent(string item) => (item ?? string.Empty).ToLowerInvariant() switch
867873
{
868-
"New" => @<div class="new-wrapper" style="padding: 20px;">
874+
"new" => @<div class="new-wrapper" style="padding: 20px;">
869875
<div class="section-title">New</div>
870876
<div class="category_container">
871877
<div class="doc_category_image"></div>
872878
<span class="doc_category_text">New document</span>
873879
</div>
874880
</div>,
875-
"Open" => @<div class="block-wrapper">
881+
"open" => @<div class="block-wrapper">
876882
<div class="section-title">Recent</div>
877883
@{
878884
var recentDocuments = new List<(string icon, string name, string description)>
@@ -886,7 +892,7 @@ Customize backstage menu items and their content using the [Template](https://he
886892
@RenderWrapperContent(doc.icon, doc.name, doc.description)
887893
}
888894
</div>,
889-
"Save" => @<div class="block-wrapper">
895+
"save" => @<div class="block-wrapper">
890896
<div class="section-title">Save</div>
891897
@{
892898
var saveItems = new List<(string icon, string name, string description)>

blazor/ribbon/gallery.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,21 @@ Apply custom styling to a gallery item by setting its [CssClass](https://help.sy
180180
};
181181
}
182182

183+
<style>
184+
185+
.e-ribbon-gallery-item.bad {
186+
background: #ffb6b6;
187+
}
188+
189+
.e-ribbon-gallery-item.good {
190+
background: #c7ebc9;
191+
}
192+
193+
.e-ribbon-gallery-item.neutral {
194+
background: #eedd9d;
195+
}
196+
</style>
197+
183198
{% endhighlight %}
184199
{% endtabs %}
185200

blazor/ribbon/items.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ This example shows how to configure Checkbox items and handle their events.
8686
{% highlight razor %}
8787

8888
@using Syncfusion.Blazor.Ribbon
89+
@using Syncfusion.Blazor.Buttons
8990

9091
<div style="width:30%">
9192
<SfRibbon>
@@ -122,7 +123,7 @@ This example shows how to configure Checkbox items and handle their events.
122123
@code {
123124
private void Created() { /* your actions here */ }
124125

125-
private void ValueChange(ChangeEventArgs args) { /* your actions here */ }
126+
private void ValueChange(ChangeEventArgs<bool> args) { /* your actions here */ }
126127
}
127128

128129
{% endhighlight %}
@@ -444,6 +445,7 @@ This example shows how to configure a ColorPicker item and handle its events.
444445

445446
@using Syncfusion.Blazor.Ribbon
446447
@using Syncfusion.Blazor.SplitButtons
448+
@using Syncfusion.Blazor.Inputs
447449

448450
<div style="width:30%">
449451
<SfRibbon>

0 commit comments

Comments
 (0)