Skip to main content

C# – ML.NET – Simple Tutorial

ML.NET - Microsoft Machine Learning for .Net

Hello Devz, Here is a simple tutorial of how to use ML.Net to make a prediction based on regression. ML.Net is an open source and cross-platform machine learning framework. A regression is a statistical method to find the relation between variables. Let’s use a budget context. We have a list of expenses with a cost […]

C# – Decision Tree – Simple Example

decision tree

Hello Devz, Sometimes it is hard to take a decision. And to represent the possibilities of complex decisions, it is usefull to use a Decision Tree. Instead of having all the parameters at once, you can simply take small decision at a time and then go further. In this simple tutorial we will show an […]

WPF – Enum Binding With Description in a ComboBox

Enum Binding with Description in a ComboBox - WPF MVVM

Hello Devz, In my two previous posts, I was talking about how to bind an enum (the classic way and the other way). But these have two major issues. First, all the items from the Enum will be bound and displayed. And sometimes you don’t want to display all of them (like ‘None’). Secondly, you […]

WPF – Enum Binding in a ComboBox – The Classic Way

Enum binding to combobox

Hello Devz, I had to write this post about how to do an Enum binding to a ComboBox, because everytime I need it, I’m surprised there is no “out-of-the-box” solution provided in WPF or Xamarin.Forms. <Window x:Class=”EnumBinding.MainWindow” xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation” xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml” xmlns:d=”http://schemas.microsoft.com/expression/blend/2008″ xmlns:mc=”http://schemas.openxmlformats.org/markup-compatibility/2006″ xmlns:local=”clr-namespace:EnumBinding” xmlns:sys=”clr-namespace:System;assembly=mscorlib” mc:Ignorable=”d” Title=”MainWindow” Height=”350″ Width=”525″> <Window.Resources> <ObjectDataProvider x:Key=”dataFromEnum” MethodName=”GetValues” ObjectType=”{x:Type sys:Enum}”> <ObjectDataProvider.MethodParameters> <x:Type TypeName=”local:StatusEnum”/> </ObjectDataProvider.MethodParameters> […]