I want to toggle grouping for a given scheduler resource and took the following approach in the SelectedChanged hander for a ToggleButton.
Are there pitfalls to this approach? Are built-in group toggles on the roadmap?
<ToolBarToggleButton Title="@(Grouped ? "Ungroup" : "Group")"
Icon="@(Grouped ? SvgIcon.Ungroup : SvgIcon.Group)"
SelectedChanged="@GroupedSelectedChanged">@Grouped
</ToolBarToggleButton>
public bool Grouped { get; set; } = false;
...
List<string> GroupingResources = ["Rooms"];
...
void GroupedSelectedChanged(bool newGrouped)
{
if (newGrouped)
{
SchedulerRef.GroupSettings = new SchedulerGroupSettings
{
Resources = GroupingResources,
Orientation = SchedulerGroupOrientation.Vertical
};
}
else
{
SchedulerRef.GroupSettings = null;
}
SchedulerRef.Rebind();
Grouped = newGrouped;
}
How can I replace the default carat expander of the TelerikTreeView with a customized expander using a TelerikToggleButton? I'd like to toggle between two ISvgIcons as my expand and collapse.
What I'm trying to accomplish is very similar to what's being done in this example with RadTreeView and ToggleButton https://docs.telerik.com/devtools/wpf/controls/radtreeview/styles-and-templates/styling-and-appearance-styling-expander.
I recall being told I would have access to source code once I buy a licence.
Now that I have a licence, how do I get access to the source so I can do a local build?
I have a toggle button in a child component, which gets the selected state passed as parameter.
The button click invokes an eventcallback back, so the parent can update the state.
When i register an method to the eventcallback of my childcomponent which also awaits a task after updating the value, the button wont change its state.
I am not a native speaker, and worried i did not explain my problem good enough so i prepared an Example
PS: I have also tried this with normal TelerikButtons. In that case i passed css classes which alter the background color, based on the value of IsSelected. This also won't when DoSomething() is called.
UPDATE: When i use the onclick event of a span, wrapped around the TelerikButtons, everything works as expected (does not work with a span inside a button).
I generated a new stylesheet using the Telerik Themebuilder and specified that the border-radius should be 0px, but after using the stylesheet in my project, I saw that all my buttons have a border-raduis, which is not the desired effect. Upon further inspection, I saw that this HTML is generated from my TelerikButton.
HTML:
<button class="telerik-blazor k-button k-button-solid k-rounded-md k-button-rectangle k-button-md k-button-solid-primary k-disabled" id="contracten-laden-button" data-id="eaee6bb5-7628-4584-861d-c02fe6f432a1" tabindex="-1" aria-disabled="true" disabled="" type="submit">
<span class="k-button-text">Contracten laden</span>
</button>
TelerikButton:
<TelerikButton ThemeColor="@ThemeConstants.Button.ThemeColor.Primary">
Contracten laden
<TelerikLoader ThemeColor="@ThemeConstants.Loader.ThemeColor.Light" Type="@LoaderType.Pulsing" Visible="@IsContracteringsStatussenLoading" />
</TelerikButton>
Upon further inspection, I saw within the computed style (in the Developer tools) that the radius is coming from the stylesheet file which I just generated. More specifically, the .k-rounded-md class, which gives a border radius of 4px. It seems like, currently, it is not possible to generate a css file with a border-radius of 0. I suppose that I have to manually change these values, but I fear that I may break some other functionality.
Could you please suggest possible solutions? Perhaps specify which classes I could change to 0px to ensure that nothing else breaks.
Thank you in advance for your response. I have attached all the files which were generated from the themebuilder, just for completion.
Kind regards,
Natasha