Comments (5)
You can add your property ShowLookUpButton
to the Content
object. Exactly as we sent the Id
, Name
and Age
in the sample.
public record NameAndAge
{
public int Id { get; set; }
public string? Name { get; set; }
public int Age { get; set; }
public bool ShowLookUpButton { get; set; } // 👈
}
[Parameter]
public DialogCustomizableExample.NameAndAge Content { get; set; } = default!;
from fluentui-blazor.
[Parameter]
public DialogCustomizableExample.NameAndAge Content { get; set; } = default!;
from fluentui-blazor.
Closing. Correct way of working explained.
from fluentui-blazor.
@dvoituron what about passing EventCallbacks?
from fluentui-blazor.
Have you tried anything? It's exactly the same:
Example adapting the Customized Dialog from our Demo website.
-
Adding properties (an Action or an EventCallback)
public record NameAndAge { public int Id { get; set; } public string? Name { get; set; } public int Age { get; set; } public Action<MouseEventArgs>? OnClick { get; set; } // 👈 public EventCallback<MouseEventArgs> OnClickCallback { get; set; } // 👈 }
-
Initializing these properties
protected override void OnInitialized() { DialogData.OnClick = (e) => { Console.WriteLine("Clicked"); }; DialogData.OnClickCallback = EventCallback.Factory.Create<MouseEventArgs>(this, ShowDTMessage); } private void ShowDTMessage(MouseEventArgs e) { Console.WriteLine("Clicked on another button"); }
-
Using these new properties in the Dialog.
<FluentDialogBody> <FluentButton OnClick="@(e => Content.OnClick?.Invoke(e) )">Click</FluentButton> <FluentButton OnClick="@Content.OnClickCallback">Click Callback</FluentButton> <FluentTextField @bind-Value="@Content.Name">Name:</FluentTextField> <FluentNumberField @bind-Value="@Content.Age">Age:</FluentNumberField> </FluentDialogBody>
from fluentui-blazor.
Related Issues (20)
- Upgrade fom 4.8.1 to 4.9.1 throws Could not find 'fluentOverflowInitialize' HOT 7
- feat: add Overlay to Splash screen shown by ShowSplashScreenAsync HOT 3
- FluentTimePicker Culture HOT 6
- NavMenu Exception HOT 4
- rfc: add FromId and ToId to FluentSortableList HOT 3
- fix: Upload button unresponsive after condition changes in FluentInputFile component HOT 1
- FluentMenu (placed on the end of page) - Page content is resizing each time menu is opening HOT 5
- FluentDataGrid - column resizing with additional unwanted effects HOT 7
- fix: Unexpected binding behavior in FluentSelect HOT 3
- FluentCounterBadge destroy menu offset in FluentNavGroup HOT 5
- fix: popover doesn't close in FluentOverflow HOT 1
- feat: add setting to always display the first item in FluentOverflow HOT 1
- fix: Class property not passed down to fluent-design-system-provider HOT 2
- FluentSearch AutoComplete
- Need help with CSS isolation with new rendering modes Blazor HOT 2
- Unable to enable Dark Theme when using Blazor SSR and Htmxor HOT 1
- fix: FluentCombobox ReadOnly not work HOT 3
- feat: Can we provide support for multiple languages HOT 6
- SelectedItemChanged doesn't trigger on first sub item HOT 1
- fix: OnRowClick is always trigger in FluentDataGrid HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fluentui-blazor.