I was just playing around with a JumpList in WPA app. I have added this code to my App.xaml:
<JumpList.JumpList>
<JumpList ShowRecentCategory="False" ShowFrequentCategory="False">
<JumpTask Title="New Note" Description="Create new note"
Arguments="/new" CustomCategory="Actions"/>
</JumpList>
</JumpList.JumpList>
Then i decided not to include that functionality in my app, so i removed those lines of code, but the item is still on the JumpList when i right click the taskbar icon.
I found solution that points to delete files from %APPDATA%\Microsoft\Windows\Recent\AutomaticDestinations\, but it didn't help.
Cleaning or rebuilding project didn't help.
As discussed in the comments, you need to leave an empty <JumpList> in your application and run it once. You should then be able to remove the <JumpList> from your markup completely if required.
If the <JumpList> element isn't present, the code to update the jump list never executes, and Windows continues to use the previous jump list.
Related
A bit of context:
I was looking into the Material Design Support Library for Xamarin and found this article about various controls from this library.
I tried to reproduce the Toolbar from the last example (for now I'm not even thinking about implementing the whole hamburger navigation example, just the toolbar with the button). I set it up, created MyTheme with my colors, added the fixes for style-v21 and so on. Everything works well so far, though the <include ... /> node throws a warning that it's not a recognized child for RelativeLayout. Still, it's building correctly so I can deal with it for the most part.
The problem:
Here's where my problem starts:
...
// Set our view from the "main" layout resource
SetContentView (Resource.Layout.main_layout);
var toolbar = FindViewById<Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);
SetSupportActionBar (toolbar);
//Enable support action bar to display hamburger
SupportActionBar.SetHomeAsUpIndicator (Resource.Drawable.ic_menu);
SupportActionBar.SetDisplayHomeAsUpEnabled (true);
...
With the SupportActionBar set up like that, it doesn't display the button. Also, the ic_menu drawable seems to be missing. In fact, there aren't any that start with ic_, only abc_.
Am I missing something here?
Cheers!
Go to https://material.io/icons/ and download menu icon and then add that icon to the drawable folder and then replace ic_menu in your code with the image name.
NOTE: Do not add image extension name like .jpg,.png with image name
So my tree loads and looks just fine and I can get it to workish. When I click on the expand button, the children load just fine, but the loading box doesn't go away. But if I click the check boxes next to the expand button it makes the loading box go away and I can then expand or minimize once more. But again when I click the expand it hangs up until I check and uncheck one of those boxes again. Can anyone point me towards what could be causing this. I don't know if maybe its just a setting or maybe I need to load my Data dynamically or something. If someone could just point me in the right direction I would be grateful.
I found out that I am getting an error now, but I have to head home for the day. Ill post the error and maybe that will help you guys help me.
Uncaught TypeError: Cannot read property 'settings' of undefinedVM105:346
delegateVM105:1240 (anonymous function)VM93:5109
jQuery.event.dispatchVM93:4780 elemData.handleVM93:5021
jQuery.event.triggerVM93:5344 jQuery.event.simulateVM93:5595
handlerVM138:742 _aspxSetInnerHtmlVM138:8958
_aspxCreateClass.ProcessFullCallbackResultVM138:8925
_aspxCreateClass.ProcessCallbackResultVM138:11431
_aspxCreateClass.ProcessCallbackResultVM138:8767
_aspxCreateClass.OnCallbackVM138:5213
_aspxCreateClass.ProcessCallbackVM138:5198
_aspxCreateClass.DoCallbackVM138:10647 $.ajax.successVM140:3062
jQuery.Callbacks.fireVM140:3174 jQuery.Callbacks.self.fireWithVM140:8249
doneVM140:8792 jQuery.ajaxTransport.send.callback
When creating an Extension for Visual Studio 2013 a tool window gets set up by default. However, I'd like to have a second tool window and can't see how one is supposed to go about that.
I have created a guide:
HOWTO: Create a toolwindow with a ToolWindowPane class in a Visual Studio package
http://www.visualstudioextensibility.com/2015/02/20/mz-tools-articles-series-howto-create-a-toolwindow-with-a-toolwindowpane-class-in-a-visual-studio-package/
Well I just found a few things - so I'm gonna answer my own question so that other people having the same problem may take advantage of it:
Set up your extension as in this tutorial but check "Tool Window"
Create a new UserControl for the ToolWindow "ToolWindow2Control" and copy paste the contents of ToolWindowControl.xaml & ToolWindowControl.xaml.cs accordingly
Add a class "ToolWindow2" and copy paste the contents from ToolWindow.cs. Change the GUID to a new one (Tools->Create GUID)
In NameOfYourProject.vsct add the code for displaying a second entry in View->Other Windows by duplicating the Button found in the Buttons section. Change the ButtonText, the priority, the id of the Button and the id of the Icon.
Add the id of the Button to the entries under Symbols on the bottom of the page. It should be a third entry under guidNameOfYourProjectCmdSet.
Open PkgCmdID.cs (or PkgCmdIDList.cs) and add the id of the Button there as well, e.g.
public const uint cmdidMyTool2 = 0x102;
Add another icon to your project / resources. Then add another Bitmap entry in the Bitmaps section of NameOfYourProject.vsct with the GUID-id that you previously gave the Icon. Like so:
<Bitmap guid="guidImages2" href="Images\test.ico" usedList="testIcon"/>
And create another GuidSymbol entry in the Symbols section with a new GUID and a single IDSymbol entry which has the same name as the one you used in the usedList, like so:
<GuidSymbol name="guidImages2" value="{7BC1F97F-2693-4186-91CC-A35AE95886CE}" >
<IDSymbol name="testIcon" value="1" />
</GuidSymbol>
Add this line to NameOfYourProjectPackage.cs:
[ProvideToolWindow(typeof(ToolWindow2))]
In NameOfYourProjectPackage.cs edit the Initialize method by copy-pasting the 3 lines under // Create the command for the tool window beneath it. In the first line use the id we gave in step #6 (cmdidMyTool2). In the 2nd line use a new MenuCommand Event handler ShowToolWindow2. And change the variable names.
Create a new method ShowToolWindow2. Copy paste from the ShowToolWindow method and change the typeof in the first line to ToolWindow2
This should be it. I hope I haven't forgot anything. You can then open the two windows under Views->Other Windows
I am currently building a test harness for the company I work at. I have experience both with C# and WatiN and have never encountered the issue I am now having.
Below, is a snippet of the markup for the page giving me the issue:
<div id="toggle1" class="NavLayout toggle">
<span onClick="toggleMenu(1, false);">
<span id="toggletext1">Quote Processing</span>
</span>
</div>
As you can see, I have a div, 2 spans and an image. I am using WatiN to try and click the image, that will then expand the menu, exposing yet another layer that I will need to click something else on. The problem I am having is in getting the 'Click' to happen. From what I can see in the snippet, it seems to me I need to be able to click the event, but cannot 'find' it with the code.
Any help out there to be had?
I have also had issues with clicking on certain elements.
I've run into issues where I could only click on an element if it was highlighted by mousing over the element.
Since I cannot see your code snippet, I can't tell if there is any javascript that deals with mouseover associated with the image, but if there is, you can try the following:
img.FireEvent("onmouseover");
img.FireEvent("onmousedown");
img.FireEvent("onMouseup");
You might also might want to try img.FireEvent("onclick") as well.
These are all guesses, since I can't see your code. It's also possible that rather than clicking on the image element itself, that you may want to try clicking on the parent object.
EDIT:
Ok, now that I can see your code, it appears that you should fire an onClick event against the span with the 'onclick' code in it.
I don't see an image listed in your code snippet, but this code should call the parent of the lowest level span.
Watin.Core.Span span = browserinstance
.Span(Find.By("innertext", "Quote Processing"));
span.Parent.FireEvent("onclick");
The DOM content that you intended to post is not visible. You might want to edit your post and check if it is visible.
In order to click on images
Watin.Core.Image img = browserinstance.Image(Find By Constraint);
if (img!=null and img.Exists)
img.ClickNoWait();
OR
img.FireEvent("onclick");
In my default.aspx page, I have some ESRI tools (and some commands) in a toolbar, so something like this.
<ToolbarItems>
<esri:Tool ClientAction="MapPoint('Map1','%toolbarItem%',false,'crosshair') DefaultImage="~/images/default_tool.gif"
EnablePostBack="True" JavaScriptFile="" Name="TestTool" SelectedImage="~/images/selected_tool.gif" DisabledImage="~/images/disabled_tool.gif"
ServerActionAssembly="Test.Web.Mapping" ServerActionClass="Test.Web.Mapping.TestTool"
Text="It's a tool!" ToolTip="Use it." />
</ToolbarItems>
Now, I have some code which is used to disable the tool, effectively changing it's image. The code basically loops over the toolbar to find the tool that needs to be disabled and does it's deed.
After the code runs, everything works beautifully. The proper tool has been disabled and the image has changed accordingly.
The problem is, if I select, say, the magnify tool, the image for the tool which I just disabled immediately changes back to the default image.
It seems like there must be some block of Javascript running somewhere that resets the state of all tools to there defaults as defined in the Default.aspx page. I'm having trouble finding it though. Any ideas?
EDIT: The code for disabling the button is C# code that is something like the following...
foreach (InteractiveImageToolbarItem toolbarTool in toolbar.ToolbarItems)
{
// First check to see if the dictionary even contains the tool, if not we assume the tool is enabled for all themes, so enable it and
// move to the next iteration.
if (!enabledTools.Keys.Contains(toolbarTool.Name))
{
toolbarTool.Disabled = false;
continue;
}
// So the tool is in the list, this loop checks to see if the tool is enabled for the current theme, meaning the theme is in the list
// associated with the tool.
foreach (string themeFromConfig in enabledTools[toolbarTool.Name])
{
if (currentTheme != themeFromConfig)
{
toolbarTool.Disabled = true;
}
else
{
toolbarTool.Disabled = false;
break;
}
}
}
It can see what should be enabled by looking at config values. Once again I'll mention, this part works fine.
Update 9/3/09: Ok, so I think I know what the problem is. In the Web ADF the method that gets called, ToolbarMouseDown, has a call at the end of it...
Toolbars[toolbarName].refreshGroup();
If a tool is clicked in any toolbar that is part of the same group as my toolbar, the image will be reset. I'm not sure I get the logic behind it, it makes it impossible to disable tools or change there images and have it persist. Whatever...
Anyway, this is all on the Javascript side of things, is there any way that I can tell when that refreshGroup call has been made or something? What I think needs to happen is when the image is reset to being enabled I need to immediately set it back to being disabled.
When WebADF controls render to the page, they reference the ADF javascript libraries. It's quite possible that there is something in the default library that is overwriting your image settings.
I would suggest using Firebug to add a javascript breakpoint to the onclick function of one of your tools, and stepping through the WebADF javascript and seeing what is happening.