diff --git a/samples/ControlCatalog/Pages/ContextMenuPage.xaml b/samples/ControlCatalog/Pages/ContextMenuPage.xaml
index 260162ddb9..25f305151d 100644
--- a/samples/ControlCatalog/Pages/ContextMenuPage.xaml
+++ b/samples/ControlCatalog/Pages/ContextMenuPage.xaml
@@ -31,6 +31,7 @@
+
diff --git a/src/Avalonia.Base/Data/Optional.cs b/src/Avalonia.Base/Data/Optional.cs
index 8e044d7896..9dec399e35 100644
--- a/src/Avalonia.Base/Data/Optional.cs
+++ b/src/Avalonia.Base/Data/Optional.cs
@@ -153,4 +153,18 @@ namespace Avalonia.Data
///
public static Optional Empty => default;
}
+
+ public static class OptionalExtensions
+ {
+ ///
+ /// Casts the type of an using only the C# cast operator.
+ ///
+ /// The target type.
+ /// The binding value.
+ /// The cast value.
+ public static Optional Cast(this Optional