RPRyan Phillipsinryanphillips.hashnode.dev·Jan 3, 2024 · 2 min readA New Way to Randomize in .NET 8We've all used random numbers in C# for various reasons. It has never been difficult to get a random number and use it, we've all probably written something like this: public int GetRandomNumber(int max) { var random = new Random(); return ra...00
RPRyan Phillipsinryanphillips.hashnode.dev·Aug 15, 2023 · 3 min readHow to use JavaScript in BlazorSome things are simply not possible to do in Blazor without JavaScript. If you need to access things like local storage or make some kinds of interactivity possible we will need to make JS calls. So how do we call JS from C#? To make this happen we w...00
RPRyan Phillipsinryanphillips.hashnode.dev·Jul 27, 2023 · 4 min readUsing Cascading Values in BlazorThere are several instances where it could be cumbersome to pass the same value down to every child component. Think of something like a theme that every component in the entire app might use. It would become painful to pass the theme again and again...00
RPRyan Phillipsinryanphillips.hashnode.dev·Jul 21, 2023 · 3 min readLevel Up Your Blazor Components with TemplatesIn my post about creating Blazor components, we went over how to create a simple Button component: <button @onclick="OnClick" @attributes="Attributes"> @Text </button> @code { [Parameter] public string Text { get; set; } = "Click me"; ...00
RPRyan Phillipsinryanphillips.hashnode.dev·Jul 19, 2023 · 1 min readMake Your Blazor Components More Flexible With CaptureUnmatchedValuesYou may have noticed when creating your Blazor components that if you try to use an attribute that you don't have a parameter for it fails to build. It can be annoying to have to add attributes for every little thing. That's where CaptureUnmatchedVal...00