I have referenced Windows.Phone.Controls and Windows.Phone.Controls.Toolkit.
When adding a map to the screen with via XML:
<phone:PanoramaItem Header="Location">
<maps:Map x:Name="Map" />
</phone:PanoramaItem>
And adding the Capability in the App Manifest:
<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Deployment.Parts>
<Capability Name="ID_CAP_MAP" />
</Deployment.Parts>
Whenever I launch the application, it just stays on the Loading screen. I have added the Capability tag in the AppManifest because it fixed the "First chance exception".
Where am I going wrong? Can anyone see an obvious fix?
Edit
if I take the map off, the app loads perfectly fine.
You don't add capabilities in AppManifest.xml. You add them in WMAppManifest.xml. Just open this file, it has a GUI window where you can tick the caps you want under Capabilities tab.
Related
I have an app that is using Material extensively. Recently there was an update to Material and looking at the documentation- they have changed how material is initialized. This is the code that I had previously added to my onLaunched method in app.xaml.cs:
this.Resources.MergedDictionaries.Add(new Uno.Material.MaterialColorPalette());
this.Resources.MergedDictionaries.Add(new ResourceDictionary() { Source = new Uri("ms-appx:///MaterialColorPaletteOverride.xaml") });
this.Resources.MergedDictionaries.Add(new Uno.Material.MaterialResources());
In looking at the updated documentation at Uno Platform Material How To
The initialization has changed to the following:
Uno.Material.Resources.Init(this, null);
I tried this and Visual Studio tells me that Resources does not exist in the namespace Uno.Material. I also looked at the sample app example and it was similar:
Uno.Material.Resources.Init(this, new ResourceDictionary { Source = new Uri("ms-appx:///MaterialColorPaletteOverride.xaml") });
Obviously it suffers from the same issue- Resources does not exist- the exact error is the method Resources does not exist in Uno.Material. I have verified the other Uno Packages are at the latest. I do have Xamarin.AndroidX.Lifecycle.LiveData installed as well. Before this update to Material- everything was working as expected. The specific update is to 1.0.0-dev.778. I have reverted to 1.0.0-dev.774 and reverted my code to the three lines I first listed- and it is working again as expected. What should I do so I can implement the new changes?
The Uno.Material library recently introduced a breaking change to the way the Material resources are initialized. Going forward, resource initialization should be done via XAML, similar to the way we initialize <XamlControlsResources /> for WinUI.
The documentation is in the midst of being updated but basically you need to move the initialization to your App.xaml like so:
<Application x:Class="Uno.Themes.Samples.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:material="using:Uno.Material">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<!-- Load WinUI resources -->
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
<MaterialColors xmlns="using:Uno.Material"
ColorPaletteOverrideSource="ms-appx:///ColorPaletteOverride.xaml" />
<MaterialResources xmlns="using:Uno.Material" />
<!-- Rest of your application resources .... -->
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
Notice the new <MaterialColors /> and <MaterialResources /> tags. Keep in mind that order is important here and MaterialColors must be initialized before MaterialResources.
The ColorPaletteOverrideSource is optional, but if you are overriding the default Material colors, you would set it here to the path where your new color palette is defined.
You can then go ahead and remove the calls to Uno.Material.Resources.Init from your App.xaml.cs.
You can have a look at the Uno.Material example for a sample of what your app might look like using the new method of resource initialization.
Im new to Maximo. I already have maximo anywhere work execution app. Please let me know how to add new button in it through worklight.
Open the index.html file and add a <button> element.
If this does not help you, please learn how to ask questions first.
You can Edit the app.xml in <: Install Root :>/apps/<: app :>/antifact, like IBM MAXIMO Anywhere guide.
link: https://www.ibm.com/developerworks/community/blogs/a9ba1efe-b731-4317-9724-a181d6155e3a/entry/Adding_Custom_Fields_to_a_Maximo_Anywhere_application?lang=en
Before you embark on that Journey, be sure to back up the default app.xml. In order to add a button you first need to modify the Application UI, changes are made in the app.xml file .\MaximoAnywhere\apps\WorkExecution\artifact\app.xml. You can add additional tags to the file, which builds the UI and makes the app.
<button border="false" cssClass="statusIcon" id="WorkExecution.WorkDetailView_status_button_1" layoutInsertAt="item3" resourceAttribute="returnActive">
<states id="WorkExecution.WorkDetailView_status_buttons_return">
<state id="WorkExecution.WorkOrderDetail_ReturnButton_render_active" image="/images/RETURNED.png" label="Return" value="true"/>
<state default="true" id="WorkExecution.WorkOrderDetail_ReturnButton_render_inactive" image="/images/RETURNED_INACTIVE.png" label="Return" value="false"/>
</states>
<eventHandlers id="WorkExecution.WorkDetailView_status_button_eventHandlers_1">
<eventHandler class="application.handlers.Custom.WODetailHandler" event="render" id="WorkExecution.WorkOrderDetail_ReturnButton_render" method="renderReturnedIcon"/>
<eventHandler class="application.handlers.Custom.WODetailHandler" event="click" id="WorkExecution.WorkDetailView_status_button_1_eventHandlers" method="onReturnStatusIconClicked"/>
</eventHandlers>
</button>
Thats an example of a button we use in the app on the Work Details screen. Notice it has a CSS class that we've added, as well as a resourceAttribute that manages the state of the button. Putting a state on the button tells the app when to render which of the images. Lastly, we have event handlers that are tied to the button, with corresponding code written in the Custom.WODetailHandler file.
I'm currently trying to display an icon in a data view. The configuration of the icon column is very simple, selectedValue is equal to 1 and the icon to be displayed is in the icon resources of the database. The xpages theme is currently set to Bootstrap4XPages. The page does not display in the browser. When I set the theme to OneUI, the page displays fine with the icon. Can anyone indicate a way to debug this? Here is a snippet of the error-log on the domino server. I removed most of the exception values to keep the post as short as possible. :
<CommonBaseEvent creationTime="2015-01-12T13:49:54.885-05:00" globalInstanceId="EL0a94000600014a3fc8c8ac000001c0" msg="CLFAD0246E: Exception occurred servicing request for: /test.nsf/test.xsp - HTTP Code: 500" severity="50" version="1.0.1">
<extendedDataElements name="CommonBaseEventLogRecord:level" type="noValue">
<children name="CommonBaseEventLogRecord:name" type="string">
<values>GRAVE</values>
</children>
</extendedDataElements>
<extendedDataElements name="CommonBaseEventLogRecord:sourceClassName" type="string">
<values>com.ibm.domino.xsp.bridge.http.engine.XspCmdManager</values>
</extendedDataElements>
<extendedDataElements name="CommonBaseEventLogRecord:sourceMethodName" type="string">
<values>service</values>
</extendedDataElements>
<extendedDataElements name="CommonBaseEventLogRecord:Exception" type="string">
<values>Context Path: /test.nsf
Page Name: /test.xsp
java.lang.NullPointerException: Argument Error: One or more parameters are null.
at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.writeAttribute(HtmlResponseWriter.java:308)
at com.ibm.xsp.theme.bootstrap.renderkit.html.extlib.data.DataViewRenderer.writeIconColumn(DataViewRenderer.java:267)
at com.ibm.xsp.extlib.renderkit.html_extended.data.DataViewRenderer.writeStandardRow(DataViewRenderer.java:792)
at com.ibm.xsp.extlib.renderkit.html_extended.data.DataViewRenderer.writeRow(DataViewRenderer.java:570)
at com.ibm.xsp.extlib.renderkit.html_extended.data.AbstractDataViewRenderer.writeRows(AbstractDataViewRenderer.java:816)
at com.ibm.xsp.extlib.renderkit.html_extended.data.DataViewRenderer.writeRows(DataViewRenderer.java:548)
at com.ibm.xsp.extlib.renderkit.html_extended.data.DataViewRenderer.writeContent(DataViewRenderer.java:256</values>
</extendedDataElements>
<sourceComponentId component="Expeditor 6.2" componentIdType="ProductName" instanceId="" location="notes" locationType="Hostname" subComponent="" threadId="1" componentType="http://www.w3.org/2001/XMLSchema-instance"/>
<situation categoryName="ReportSituation">
<situationType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ReportSituation" reasoningScope="INTERNAL" reportCategory="LOG"/>
</situation>
</CommonBaseEvent></CommonBaseEvents>
The problem lies here from the error: com.ibm.xsp.theme.bootstrap.renderkit.html.extlib.data.DataViewRenderer.writeIconColumn(DataViewRenderer.java:267)
It is a bug, one that I discovered myself just recently. I have a fix identified for it that we will release in the next extlib version (not sure when that will be). When the title attribute is left empty for the icon, it attempts to use the alt attribute as a title instead. The problem is it doesnt check if an alt value exists, and when it doesn't it tries to write null as an attribute, and you get the NullPointerException. Simple fix in the DataViewRenderer code.
I think you can work around the issue though if you set either the title or alt attributes of the image icon. So give that a go for now.
Check devtools (browser debug tools) and see if there is an Icon in the html code and see it the path is valid. If there is no icon then maybe the bootstrap plugin may not support it.
Either way, you can always easily add an icon client side using jQuery or plain client side JavaScript
I've got a really weird issue I can't fix within a Wpf Application. We built a Common Library containing many useful components, one of them is a fancy MessageBox which has the company style. There're three dictionaries that contains nearly everything we require:
<ResourceDictionary Source="/Library;component/Style/Styles.xaml" />
<ResourceDictionary Source="/Library;component/Themes/Globals.xaml"/>
<ResourceDictionary Source="/Library;component/Themes/Controls/Button/Template.xaml"/>
There's a footer for the MessageBox into Globals.xaml, footer uses a template from Template.xaml. It works perfectly but not in one case. I have a main window that dinamically create a plugin and open a window. This window is a regular Window Wpf application loaded through reflection.
Method to open MessageBox is within the same DLL as Resource Dictionaries.
If I call this MessageBox method from the plugin it throws an exception because "Footer" is not found. I set a breakpoint before
window.ShowDialog();
And I see MergedDictionaries is empty into window. Also empty everywhere, only owner of this MessageBox contains those resources. Doing
window.FindResource("key");
Get a null value as expected. However, if I manually copy merged dictionaries using this code lines before open dialog:
foreach (var dict in owner.Resources.MergedDictionaries)
{
window.Resources.MergedDictionaries.Add(dict);
}
And then look for window.FindResource("key") I can see the style, but even though it continues throwing an exception:
Cannot find resource named '{Footer}'. Resource names are case sensitive.
Footer style is used in this line of MessageBox:
<StatusBar Style="{StaticResource Footer}" DataContext="{Binding ElementName=window}"...
I've also tried to declare this resource into the DialogWindow in the library, even when I've not gonna be allowed to change it:
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Library;component/Themes/Generic.xaml" />
<ResourceDictionary Source="/Library;component/Themes/Globals.xaml"/>
<ResourceDictionary Source="/Library;component/Themes/Controls/Button/Template.xaml"/>
</ResourceDictionary.MergedDictionaries>
I've been 2 days knocking my head on the monitor and nothing, everything I tried failed. Despite of breaking a monitor of course.
Ran out of ideas...
Regards.
Make sure of the following things
The resource dictionary Build Action is set to Page
Every project that references the Style has a library reference to it (Even if you put the Dictionary in App.xaml if a project that doesn't reference the Resources Library then it wont find it
Place the MergedDictionaries in App.xaml (or in the specific page you want to use them)
I have this add-on bar at the button of my firefox window where several buttons from extensions are shown. How can I add my own button there?
you can open the source code of that bar and add your own button
example (I'm on Windows right now):
C:\%AppData%\Roaming\Mozilla\Firefox\Profiles\PROFILEID.default\extensions\EXTENSION-TO-EDIT-FOLDER\chrome\content
A good way to do this is with the Add-on SDK. You can find documentation on adding an Add-on bar button here.
An additional benefit of using the SDK is that your add-ons won't require a restart after they are installed.
hey it is called a status bar and u should consider putting a statusbar xul element
e.g
<?xml version="1.0"?>
<overlay id="sample"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<statusbar id="status-bar">
<statusbarpanel id="my-panel" label="Hello, World" />
</statusbar>
</overlay>
For more details check this link statusbar attributes, methods and properties