private OptionHandler CreateOptionHandler() { var handler = new OptionHandler(PreferredPlacement); IOptionItem item; handler.AddString(LabelText, "Label").PropertyChanged += OptionHandlerPropertyChanged; handler.AddDouble(PlacementDistance, 5.0).PropertyChanged += OptionHandlerPropertyChanged; item = handler.AddList(PlacementAlongEdge, PlacementsAlongEdge, PlacementsAlongEdge[0]); item.PropertyChanged += OptionHandlerPropertyChanged; item = handler.AddList(PlacementSideOfEdge, PlacementsSideOfEdge, PlacementsSideOfEdge[0]); item.PropertyChanged += OptionHandlerPropertyChanged; item = handler.AddList(PlacementSideReference, SideReferences, SideReferences[0]); item.PropertyChanged += OptionHandlerPropertyChanged; handler.AddDouble(Angle, 0.0).PropertyChanged += OptionHandlerPropertyChanged; item = handler.AddList(AngleReference, AngleReferences, AngleReferences[0]); item.PropertyChanged += OptionHandlerPropertyChanged; item = handler.AddList(AngleRotation, AngleRotations, AngleRotations[0]); item.PropertyChanged += OptionHandlerPropertyChanged; handler.AddBool(AngleAdd180Degree, false).PropertyChanged += OptionHandlerPropertyChanged; var rm = new ResourceManager("Demo.yFiles.Layout.PreferredLabelPlacement.PreferredLabelPlacement", Assembly.GetExecutingAssembly()); var rmf = new ResourceManagerI18NFactory(); rmf.AddResourceManager(handler.Name, rm); handler.I18nFactory = rmf; return(handler); }