/// <summary> /// Sets a collection of application-scope resources, such as styles and brushes. Provides a /// simple way to support a consistent theme across your application. /// </summary> /// <param name="resources">Application resources.</param> public static void SetApplicationResources(ResourceDictionary resources) { Noesis_SetApplicationResources(Extend.GetInstanceHandle(resources)); }
/// <summary> /// Loads a XAML resource from a Stream. /// </summary> /// <param name="stream">Stream with xaml contents.</param> /// <param name="filename">Path to the resource.</param> /// <returns>Root of the loaded XAML.</returns> public static object LoadXaml(Stream stream, string filename) { IntPtr root = Noesis_LoadStreamXaml(Extend.GetInstanceHandle(stream), filename ?? string.Empty); return(Extend.GetProxy(root, true)); }
/// <summary> /// Sets TextureProvider to load texture resources. /// </summary> public static void SetTextureProvider(TextureProvider provider) { Noesis_SetTextureProvider(Extend.GetInstanceHandle(provider)); }
/// <summary> /// Sets XamlProvider to load XAML resources. /// </summary> public static void SetXamlProvider(XamlProvider provider) { Noesis_SetXamlProvider(Extend.GetInstanceHandle(provider)); }
/// <summary> /// Sets Theme resources. /// </summary> /// <param name="theme">Dictionary with default styles for all controls.</param> public static void SetTheme(ResourceDictionary theme) { Noesis_SetTheme_(Extend.GetInstanceHandle(theme)); }
/// <summary> /// Loads a XAML resource, like an audio, at the given uniform resource identifier. /// </summary> public static Stream LoadXamlResource(string filename) { IntPtr stream = Noesis_LoadXamlResource(filename); return((Stream)Extend.GetProxy(stream, true)); }
/// <summary> /// Returns the build version, for example "1.2.6f5". /// </summary> public static string GetBuildVersion() { IntPtr version = Noesis_GetBuildVersion(); return(Extend.StringFromNativeUtf8(version)); }
public static void UnregisterCallbacks() { Extend.UnregisterCallbacks(); }
public static void RegisterNativeTypes() { Extend.RegisterNativeTypes(); }
public static void UnregisterFunctions() { Extend.UnregisterFunctions(); }
public static void RegisterCallbacks() { Extend.RegisterCallbacks(); }
public static void RegisterFunctions(Library lib) { Extend.RegisterFunctions(lib); }
object IXamlNameResolver.Resolve(string name) { IntPtr objectPtr = MarkupExtensionProvider_ResolveName(_provider, name); return(Extend.GetProxy(objectPtr, false)); }
string IXamlNamespaceResolver.GetNamespace(string prefix) { IntPtr strPtr = MarkupExtensionProvider_GetNamespace(_provider, prefix); return(Extend.StringFromNativeUtf8(strPtr)); }
/// <summary> /// Loads a XAML resource. /// </summary> /// <param name="filename">Path to the resource.</param> /// <returns>Root of the loaded XAML.</returns> public static object LoadXaml(string filename) { IntPtr root = Noesis_LoadXaml(filename); return(Extend.GetProxy(root, true)); }
public static void ResetDependencyProperties() { Extend.ResetDependencyProperties(); }
/// <summary> /// Parses a well-formed XAML fragment and creates the corresponding object tree. /// </summary> public static object ParseXaml(string xamlText) { IntPtr root = Noesis_ParseXaml(xamlText); return(Extend.GetProxy(root, true)); }
/// <summary> /// Loads a XAML resource. /// </summary> /// <param name="xaml">Path to the resource.</param> /// <returns>Root of the loaded XAML.</returns> public static object LoadXaml(string xaml) { IntPtr root = Noesis_LoadXaml_(xaml); return(Extend.GetProxy(root, true)); }
/// <summary> /// Loads contents of the specified component from a XAML. /// Used from InitializeComponent; supplied component must match the type of the XAML root /// </summary> public static void LoadComponent(object component, string filename) { Noesis_LoadComponent(Extend.GetInstanceHandle(component), filename); }
/// <summary> /// Loads contents of the specified component from a XAML. /// Used from InitializeComponent; supplied component must match the type of the XAML root /// </summary> public static void LoadComponent(object component, string xaml) { Noesis_LoadComponent_(Extend.GetInstanceHandle(component), xaml); }
/// <summary> /// Unregisters the native types generated for managed extend classes, so they can be /// modified and updated without unloading NoesisGUI. /// </summary> public static void UnregisterNativeTypes() { Extend.UnregisterNativeTypes(); }
/// <summary> /// Sets FontProvider to load font resources. /// </summary> public static void SetFontProvider(FontProvider provider) { Noesis_SetFontProvider_(Extend.GetInstanceHandle(provider)); }
private static RoutedEvent AddRoutedEvent(string name, RoutingStrategy routingStrategy, Type handlerType, Type ownerType) { IntPtr routedEventPtr = Noesis_EventManager_RegisterRoutedEvent(name, (int)routingStrategy, Extend.GetNativeType(ownerType)); RoutedEvent routedEvent = (RoutedEvent)Extend.GetProxy(routedEventPtr, false); RegisterRoutedEvent(routedEvent, handlerType, GetInvoker(handlerType)); return(routedEvent); }
/// <summary> /// Performs a layout pass and sends updates to the render tree. /// </summary> /// <param name="timeInSeconds">Time elapsed since the start of the application.</param> public void Update(double timeInSeconds) { Extend.Update(); GUI.SoftwareKeyboard.Update(); Noesis_View_Update_(CPtr, timeInSeconds); }